Is there a way in java to execute the jar file with administration privilege, when double click on jar file open with admin privilege ?
i know this way: go to C:\Program Files\Java\jre6\bin and right click on javaw.exe file choose compatibility 开发者_如何学Goand click on run this program as an administrator.
but this way isn't an appropriate for normal application users >>>
Thanks.
You could call the JRE from an executable and add an administrator manifest.
Bat To Exe Converter works nice for such workarounds.
It will allow you to write a batch file and convert it into an self-extracting executable that contains your .jar file.
精彩评论