Java - Could not find the main class?

Posted by asmo on Stack Overflow See other posts from Stack Overflow or by asmo
Published on 2010-06-08T21:36:42Z Indexed on 2010/06/08 21:42 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about java

Related posts about jar