Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not findind main class

Status
Not open for further replies.

drimades

IS-IT--Management
Nov 8, 2004
221
MK
My application executes smoothly when I Run the project from Netbeans. After a Clean & Build I tried:

java -jar "/home/eus/NetBeansProjects/HimaraTest/dist/HimaraTest.jar"

and strangely it gives me the following error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Sheet
Caused by: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Sheet
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: himaratest.NewJFrame4. Program will exit.

Someone can tell me why? What is wrong with the app?
 
You have to include poi.jar in the classpath with
Code:
-classpath <route to the jar>/<jar file name>

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top