File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes NoClassdefFound in Unix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassdefFound in Unix" Watch "NoClassdefFound in Unix" New topic
Author

NoClassdefFound in Unix

Swapnil Shroff
Ranch Hand

Joined: Mar 07, 2006
Posts: 58
I am running a program like



And I am getting an error as



However I have added all the jars in cp. I also tried using -classpath.
Any idea why the problem. thanks


SCJP 5, SCDJWS<br /> <br />It's amazing how premature optimisation is both seductive and destructive; even when you know
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Swapnil,
Have you tried putting the classpath in quotes as follows?

java -cp "JMdsAPI.jar:JTib.jar:jcachetek.jar:util.concurrent.jar:junit.jar:log4j-1.2.14.jar" com.jpmorgan.servers.cachetek.junit.JCachetekMDSTest


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Kevin Smither
Ranch Hand

Joined: Oct 22, 2007
Posts: 30
try fully qualifying the path to the jars, such as...

java -classpath /libs/log4j-1.2.14.jar

etc. etc. The issue is that it can't find the jar so there are only 2 possibilities, the full path to the jar needs to be specified or the jar does not exist.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: NoClassdefFound in Unix
 
Similar Threads
remote copy file
Parse Command file
Can not run jsp in tomcat 5.0.19
==> saxonb : but : RuntimeException: No query engine found
invalid LOC header - How to overcome this Exception?