Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
NoClassdefFound in Unix
Joined: Mar 07, 2006
Jan 02, 2008 10:24:00
I am running a program like
java -cp JMdsAPI.jar:JTib.jar:jcachetek.jar:util.concurrent.jar:junit.jar:log4j-1.2.14.jar com.jpmorgan.servers.cachetek.junit.JCachetekMDSTest
And I am getting an error as
java.lang.NoClassDefFoundError: org/apache/log4j/xml/DOMConfigurator at com.jpmorgan.servers.cachetek.junit.JCachetekMDSTest.main(JCachetekMDSTest.java:38)
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
author & internet detective
Joined: May 26, 2003
Jan 02, 2008 20:08:00
Have you tried putting the classpath in quotes as follows?
-cp "JMdsAPI.jar:JTib.jar:jcachetek.jar:util.concurrent.jar:junit.jar:log4j-1.2.14.jar" com.jpmorgan.servers.cachetek.junit.JCachetekMDSTest
OCA 8 book
How To Ask Questions The Smart Way
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
Joined: Oct 22, 2007
Jan 02, 2008 23:25:00
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.
I agree. Here's the link:
subject: NoClassdefFound in Unix
Can not run jsp in tomcat 5.0.19
invalid LOC header - How to overcome this Exception?
Parse Command file
==> saxonb : but : RuntimeException: No query engine found
remote copy file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015