Vista UAC

Hi Java Guys,

I am basically a VC programmer. My application has a Java User Interface. The application should be run as administrator since it will make some low-level system calls.

In case of Windows Vista, any C application can be run with elevated privileges by providing a manifest file with required execution level as 'RequiresAdministrator'. Can such facility be provided for a jar file so that JVM will recognize the required privilege level and elevate itself? Or we should have some wrapper application which will elevate the privilege level and launch JVM?

For me, JVM version doesn't matter since I can use the latest JVM available.

Thanks,

[688 byte] By [Killmea] at [2007-11-27 9:43:24]
# 1
So you were planning to make low level system calls with Java?Java doesn't have that, as far as I know.
-Kayaman-a at 2007-7-12 23:48:41 > top of Java-index,Java Essentials,Java Programming...
# 2
No, for low level system calls I use C DLL through JNI. My real problem is that I don't have any way to indicate Vista OS about my Java UI application which comes in a jar file to run at elevated execution level.
Killmea at 2007-7-12 23:48:41 > top of Java-index,Java Essentials,Java Programming...
# 3
You are running the JVM, you should check your OS how to fiddle with the "execution level" of java.exe.
BIJ001a at 2007-7-12 23:48:41 > top of Java-index,Java Essentials,Java Programming...
# 4

Yes, actually I can run mt.exe on javaw.exe or java.exe to change its elevation level. But the problem here is I think it is not legally correct to do that since that may violate the licensing terms. That's why I am looking for an alternative.

Another way is to create an executable that can be manifested with elevated execution level and launch JVM from it. That is possible. But I thought of avoiding having another executable file in the final installation package if JVM or jar provides an option to elevate the execution level. That's all.

Killmea at 2007-7-12 23:48:41 > top of Java-index,Java Essentials,Java Programming...
# 5
At last, I found that we can use external manifests too. That has solved my problem. But note that this may not work if the java*.exe is already manifested by the provider.Thanks.
Killmea at 2007-7-12 23:48:41 > top of Java-index,Java Essentials,Java Programming...