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?
Asked
Active
Viewed 795 times
0
-
create a `.war` or `.jar` file and deploy it – Kalaiselvan Dec 04 '17 at 04:23
-
Possible duplicate of https://stackoverflow.com/questions/18458682/how-to-generate-executable-of-java-project-in-eclipse – Script_Junkie Dec 04 '17 at 04:23
-
What do you mean by "install on another computer"? Just copy the source code and rebuild the project, or make a "runnable" GUI only? – OneCricketeer Dec 04 '17 at 04:58
2 Answers
0
As the Help page says:
To create a new runnable JAR file in the workbench:
- From the menu bar's File menu, select Export.
- Expand the Java node and select Runnable JAR file. Click Next.
- 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.
- In the Export destination field, either type or click Browse to select a location for the JAR file.
- Select an appropriate library handling strategy.
- Optionally, you can also create an ANT script to quickly regenerate a previously created runnable JAR file.
If you want to export it in a manner that allows another user to import and edit it, than export it as an archive:

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
-
-
-
@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