0

I'm working under a java desktop application project. I completed my java project using eclipse and it has many packages and class files in separate packages. My main class is Mainframe. My problem is I have to install this project into another computer, how can I convert my project to installation file?

2 Answers2

0

As the Help page says:

To create a new runnable JAR file in the workbench:

  1. From the menu bar's File menu, select Export.
  2. Expand the Java node and select Runnable JAR file. Click Next.
  3. In the Opens the Runnable JAR export wizard Runnable JAR File Specification page, select a 'Java Application' launch configuration to use to create a runnable JAR.
  4. In the Export destination field, either type or click Browse to select a location for the JAR file.
  5. Select an appropriate library handling strategy.
  6. Optionally, you can also create an ANT script to quickly regenerate a previously created runnable JAR file.

enter image description here

If you want to export it in a manner that allows another user to import and edit it, than export it as an archive:

enter image description here

Community
  • 1
  • 1
Cardinal System
  • 2,749
  • 3
  • 21
  • 42
  • Thanks but the this method create only one class file to runnable JAR file. But I have many classes in many different packages. –  Dec 04 '17 at 04:32
  • @Viji A JAR file can only have one executable class, but it includes all dependencies needed for it to run – OneCricketeer Dec 04 '17 at 04:38
  • @Viji you must be doing something wrong. Exporting a runnable jar includes *every thing*, even libraries, so long as they are in the same project. – Cardinal System Dec 04 '17 at 04:51
  • I done archive file, but how can I change it to windows intstallation file? –  Dec 04 '17 at 05:09
  • @Viji do you something like `exe` or `msi`? – Cardinal System Dec 04 '17 at 05:12
  • @Cardinal First I done JAR file and next is archive file that is ZIP format. You mentioned two types. –  Dec 04 '17 at 05:19
0

You can use Launch4j (http://launch4j.sourceforge.net/) to be able to create executable files (.exe) from Java projects.

Herupkhart
  • 499
  • 4
  • 23