Reputation: 23
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 )
Upvotes: 0
Views: 295
Reputation: 7149
Properties
Packaging
Compress JAR File
OK
Clean and Build
dist
folder for the JAR
file
Run
Browse
near to Main Class
label
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
Upvotes: 3
Reputation: 2969
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
Upvotes: 0