I have a DLL which has certain functionality which requires UAC elevated privileges in order to work properly. I changed the manifest file to level=requireAdministrator
, but when I load the dll in Java the functionality fails.
Note that loading the dll works, but the implementation of the native methods execute as if there's no elevated privileges (doesn't even ask me to use UAC elevated privileges).
The setup consists of a runnable jar file (exported using Eclipse) with the native library file in the same directory. Ideally, I would like someone to just double click the jar file to run the program.
Is there some way I could have this particular jar file start the JVM with elevated privileges (as opposed to always or never starting the JVM with elevated privileges)? Or is an external program required to launch the JVM with elevated privileges?