• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create *.exe (executable program) ?

 
Thomas Whalen
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic