This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Generate an exe file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Generate an exe file?" Watch "Generate an exe file?" New topic
Author

Generate an exe file?

Gurukant Desai
Greenhorn

Joined: Aug 18, 2007
Posts: 2
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?


fieryindian
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31054
    
162

There are a number of programs that compile Java into a Windows exe.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
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
    Bartender

    Joined: Oct 14, 2005
    Posts: 18986
        
        8

    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.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Generate an exe file?