I’m having a hard-time with a Java error. I’m getting this when double-clicking on my compiled project Jar file in order to run it:
Could not find the main class: testPackage.testFrame. Program will exit.
However, my main class is cleary defined in the project properties. Furthermore, everything works fine when I run the project directly from NetBeans.
I’m using the ip2c.jar third-party library to determine countries from IP addresses. If I comment the class that is using the ip2c.jar file, I don’t get the error.
How can a third-party library be preventing the JVM from finding my main class?
Is it that when you comment above mentioned usage, some classes get compiled properly?
and when you include, you have some error, that causes the .class for your Main class not be generated? – just a hint as a third-party jar would not interfere with META-INF/MANIFEST.MF in main jar.