Hello Guys am a new to the forum and happy to be a member. Please i have problem with my .jar file. After building my projecct i went to open the jar on the dist folder in Netbeans but i receive this error COULD NOT FIND THE MAIN CLASS PROGRAM WILL EXIT! please guys how do i correct this error. Thanks for concern
Not sure if you have already found an answer. To make a jar file execute, you need a manifest file within. Do you know if Netbeans has generated a manifest file automatically for you? You can check if you jar file has a manifest file by opening your jar with winzip or winrar and examine the manifest file for a line
Main-Class: <your main class with package name>
If it is not there, create one and add it to the jar.
hope this helps...
Edited by: Sethu.R on May 2, 2010 3:33 AM
..did what you told me but it did not work ..
1) What did not work?
- Open the Jar in WinZip
- Find the manifest file
- Create a manifest file
- Add a manifest file to the Jar
Nobody who is not in front of your computer can guess which one of those things "did not work". To get help, you need to be a lot more specific about what did not work.
2) What was the exact (copy/paste) output you got from the part that did not work?