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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to reference classes in jar file

Status
Not open for further replies.

redsss

Programmer
Mar 17, 2004
72
US
I'm trying to run a java example I downloaded from
I must be doing something wrong because I get the error
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jsresources/apps/jmvp/manager/ResourceManager
when I execute it like so:
Code:
java -classpath jmvp-2003-06-20.jar -jar midiplayer-2003-06-20.jar
I checked the far file and found that class in the given path. What am I doing wrong?
 
I don't think there's anything wrong with what you typed. I took the liberty of downloading the file and extracing the jar file and browsed down to the path it's looking for. The person that created the jar file must have made a mistake in entering the locations of the imported classes, since there is no /appa/jmvp directory in the jar file.

Double-check yours again, but I downloaded the same version you have and it was missing that directory.

Nick Ruiz
Webmaster, DBA
 
You sure? I opened the file jmvp-2003-06-20.jar with ark (a linux version of winzip) and see a file with the path org/jsresources/apps/jmvp/manager/ResourceManager.class with an original filesize of 3115 bytes.
 
That's not a ClassNotFoundException but a NoClassDefFound error.

Looks like you need more classes on your classpath.

Cheers,

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top