• Post Reply Bookmark Topic Watch Topic
  • New Topic

Converting Swing appl. to .exe file

 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a SWING application.

How do i convert it into a .exe file?

Can anyone help me out?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you turn it into an exe file, your application will be tied up to the windows platform.
Instead make a self executing jar.
http://java.sun.com/docs/books/tutorial/deployment/jar/
http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a Jar to Exe Utility to create exe file from Jar.
 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to make a jar file I get the following error.

'jar' is not recognized as an internal or external command,
operable program or batch file.
 
Gerbrand van Dieijen
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found Exe4j work very well, to turn start java application as executable: http://www.ej-technologies.com/products/exe4j/overview.html

Saved me the trouble that I had with batch files or executable jar files, while still having a lot of flexibility:

- Exe4j automatically detects if the user has Java installed. If not, a the user is given the option to go to javasoft.com and download & install a vm
- Exe4j can handle multiple installed vm's. You can optionally specify what version your software needs (java 1.5, java 1.6, any version, etc.)

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gohan goku wrote:When I try to make a jar file I get the following error....[/color]


Have you installed the JDK or JRE? (JDK required)
Have you modified your PATH to include the java installation directory?
The jar.exe will be under JAVA_HOME/bin
 
Campbell Ritchie
Marshal
Posts: 52590
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you get that sort of error message, you have most probably set your PATH incorrectly. Look at this Java™ Tutorials page, particularly the "common problems" link.
 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all.......

Created the jar and converted it into .bat and .exe file..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!