I am running Windows 7 Pro and working on a Java application in Eclipse. I need Eclipse to send user-specified commands (such as 'chkdsk C:') to the command prompt and then output to the console in Eclipse whatever the command prompt would have printed. I have the sending commands working and the receiving text back. However, when I to run chkdsk I need to have admin privileges for the command session. I see from the thread here:
that one way to do this is through a .manifest file. However, I am having trouble understanding how to create a manifest file for Java:
Does the .manifest file just go into the Eclipse workspace with the .CLASS files? If I put it there will it run automatically to start my program in admin mode whenever I run the program?
The link given from the above thread:
http://msdn.microsoft.com/en-us/library/bb756929.aspx
seems to be Visual-Studio specific, will there example code work for a Java program .manifest file? Do I need to create the .manifest file in Visual Studio or is it just a text file?
Also, the name of the manifest file is yourProgram.exe.manifest ... Java as I understand it doesn't create executables of the .exe variety does it? Should the manifest file be named as above or does it need a name like yourProgram.CLASS.manifest?
Thank you for any help!
Java manifest (.MF)
andWindows style manifest (.manifest)
are two different files. Usually, we create an EXE launcher for the jar. EXE launcher like Launch4J can embed into EXE a Window style manifest. See the link #259228 – Corroboree