Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling question

Status
Not open for further replies.

bjanssen

Programmer
Mar 11, 2001
10
AU
Hi,
I have written myself a small app with a main(String[] args) method in VisualAge for Java. I would like to be able to use this little app on any pc from a DOS command line. It seems the only export option is to export to a jar file. How do I convert this jar file into a self running exe file? (Or any other extension, as long as it runs on any machine!)
Thanks, Brett.
 
jar files are executable, so long as you define the manifest for the jar properly, here is a link to how to do it.

There is also a tutorial I think, somewhere around. Make sure to include all classes in your jar, and watch out for whitespace in your manifest file.
b[sup]2[/sup] - benbiddington@surf4nix.com
 
That works OK if I have java.exe on my machine, but when I want to take this program to someone elses machine who does not have java, they can't run it. I don't really want to take java.exe, myapp.jar, run.bat, etc to get it going. I really want my app to just run from a single file, on any machine...Is this possible? Thanks again...
 
Well you mean transporting the actual runtime environment? surely that is not possible? You can't run a java Application without the JVM, so I don't think you can do that - are you sure they aren't Java enabled? the other thing you could do is make it an Applet, and they can use their browser. Easier than installing JRE on their computer!
b[sup]2[/sup] - benbiddington@surf4nix.com
 
Yes that's true...it would be nice if I could do it with a file though. I guess what I'm really after is a third party (?) compiler that wil compile java source natively. But I suppose that defeats the purpose of Java....oh well!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top