This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generate an exe file?

 
Gurukant Desai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to convert java programs to windows .exe files using eclipse?
How are the applications such as Azureus, limewire etc packaged into an exe installer?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a number of programs that compile Java into a Windows exe.
 
Campbell Ritchie
Sheriff
Posts: 48445
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure you either can or want to create .exe files.
What you do is to create an executable .jar file.
If I remember correctly, this is how you do it in Eclipse:
  • Right-click the name of the project in the left pane.
  • Click export
  • In the new window click the arrowhead near "Java" so expand the list.
  • Click ".JAR file"
  • Click "Next"
  • Enter a name for the .jar file
  • Click "next" twice.
  • Put the name of the class with the main method in the box.
  • Click finish.
  • Find the .jar file.
  • Copy a shortcut to it onto the Windows desktop.
  • If your file associations are set up properly, then you can run the application by double-clicking he desktop icon.
  • If you need to add other files to your classpath, search through this forum and find my earlier posts about adding to the classpath.
     
    Paul Clapham
    Sheriff
    Pie
    Posts: 20769
    30
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Also, just because those applications use a Windows installer to get themselves loaded onto Windows machines, it doesn't follow that the result of the installation is a Windows exe file. If you want to get your application installed on other people's Windows machines, I definitely recommend using a Windows installer to do that. But I don't recommend using those applications that convert your application into a standalone exe file. They usually aren't necessary and often people seize upon them because they don't realize that they can use a standard Windows installer instead.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic