Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Executable Jars and their Classpath

843810Apr 13 2005 — edited Nov 1 2006
I have made a java application that takes requires several libraries to run. I am using netbeans 4.0 but have reached the stage where I'd like it to become a standalone application.

I have editted the projects properties in netbeans to use the correct libraries for compilation and set the correct arguments to run it. It runs fine in netbeans. However, when i try to execute the jar file that netbeans generates with the command...
    java -jar  PeerPressure.jar
i get the error...
  Exception in thread "main" java.lang.NoClassDefFoundError: net/jxta/pipe/PipeMsgListener
I have tried to modify the manifest.mf file to (it has 2 enters at the end)....
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Main-Class: Main
Class-Path: /lib/jxta.jar /lib/bcprov-jdk14.jar /lib/javax.servlet.jar /lib/log4j.jar /lib/org.mortbay.jetty.jar
but i get the same error. I've also tried the command...
  java  -classpath \lib\jxta.jar;\lib\log4j.jar;\lib\bcprov-jdk14.jar; -jar PeerPressure.jar
I'm not sure what else i could try. I've already looked through loads of tutorials and forums posts but still havent got any further. Any help would be great.

Cheers
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2006
Added on Apr 13 2005
10 comments
1,226 views