java executable
OK, I know how to run Java from the (DOS) command line, and how to make an applet,
but how do I make an executable Java file? such as any normal program with an icon that you double click to run the program. (this is a windows thing, my linux died. sigh) titanium_geek [ANY other methods achieving the same end will do for me aswell.] |
You can make an executable .jar file but i haven't bothered finding out how yet (i would do it now, but my head really hurts).
Sorry if i couldn't be more helpfull |
You can write a native Windows program (e.g. in C) that invokes the Java Virtual Machine. Details can be found at http://java.sun.com/docs/books/tutor...king/invo.html.
|
you could also create a batch file with the commands in it to run the program.
|
thanks guys..
gave me the keywords I needed to do a good Google search. titanium_geek |
Excutable JAR
The key thing for an excutable jar file is to add a manifest file to the jar (.mf file) that states the top level class with the void main(String[]) method in it. I can't think of a program I use off the top of my head that does this (maybe PrettyPrinter), generally people just provide a jar file and .bat/.sh files to execute the class.
|
Manifest File
Ahh, I finally thought of a program that uses an excutable jar. Pooka, an all Java email client does. Here is the manifest (I cut all the digest stuff off the bottom):
Manifest-Version: 1.0 Class-Path: activation.jar mbox.jar mail.jar kunststoff.jar jnet.jar j cert.jar jsse.jar jh.jar Created-By: Ant 1.4.1 Main-Class: net.suberic.pooka.Pooka |
wow. thanks guest.
Ok. here's the "REAL" deal. I'm in a java class, (excuse pun) and my teacher is really curious to find out how to make a java exe file. titanium_geek |
That's sad, you're teacher should know how to search...
|
hem. It's for extra credit....
titanium_geek |
All times are GMT -5. The time now is 06:26 AM. |