I have a java package with many java class and many main. i wish to make jar from these package ? can you help me please ? (i work with netbeans )
3 Answers
If the project is under netbeans IDE, you should follow these steps:
Properties
Packaging
Compress JAR File
OK
Clean and Build
dist folder for the JAR file
To select the main class that will be executed
Run
Browse near to Main Class label
EDIT :
If you are using netbeans under windows, and if the jar file does not generate any output, try the following command in cmd :
start /b <jar file>
Then an error should appear
So you can know what is the problem
3 Comments
I found this site useful... Hope it helps deploying jar
1 Comment
Right click on the the project in net beans project window and choose Project Properties -> run , there you can setup your main class
clean and build your project and go to your netbeans project -> your project -> dist there is the executable jar file.
selected main class will be executed when you execute the generated jar file
