aspose file tools*
The moose likes Beginning Java and the fly likes create *.exe (executable program) ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "create *.exe (executable program) ?" Watch "create *.exe (executable program) ?" New topic
Author

create *.exe (executable program) ?

Thomas Whalen
Ranch Hand

Joined: Aug 26, 2001
Posts: 123
Even though I am just beginning in Java I would like to know how to convert a java application to a program that can be run just by clicking on it from the computer's desktop??? otherwise, i don't like the idea of running applications from the JRE or from an IDE.
thanks,
thomas


if you don't know, then ask. if you do know, then share. love is knowledge.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Create a .bat file (or it's equivalent) then you can set the classpath to what you want etc.
This is a .bat file that sets the path to the jre that was bundled with this application, and sets the classpath, invokes the app and brings in a properties file. The actual call to the app is bolded.
RunAPP.bat

cd \"Program Files"\app
path = .;C:\"Program Files"\app;C:\"Program Files"\app\jre\bin;
"c:\Program Files\app\jre\bin\javaw" -classpath .;"c:\Program Files\app";"c:\Program Files\app\app.jar";"c:\Program Files\app\deploy.jar";"c:\Program Files\app\jre\lib\rt.jar";"c:\Program Files\app\jre\lib\jaws.jar";"c:\Program Files\app\jre\lib\i18n.jar";"c:\Program Files\app\classes12.jar";"c:\Program Files\app\images" app.client.APPDesktop "c:\Program Files\app\APP.properties"

There is an icon that points to this bat file so the user can just click the icon.
[This message has been edited by Cindy Glass (edited November 12, 2001).]


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
 
subject: create *.exe (executable program) ?
 
Similar Threads
Calling JSP from Java class
about pathname.
What Java book to get for a beginner?
call java (main) program from JSP
Open - Close exe