Making our way to the jars...

From: Rico (ras_nas_at_yahoo.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 07:41:58 +0800

D:\program files\Eclipse\workspace\FolderMonitor>java -cp D:\activation.jar;D:\m
ail.jar;D:\log4j-1.2.8.jar -jar folder*

Am I doing something wrong with the above command?
The 3 jars are in D:\ (of course) but I get NoClassDefFoundError:
javax/mail/Address

I started off with them all in the same folder as the jar I'm trying to
run. That also gave NoClassDefFoundError

When I move the jars to jre\lib\ext, things work fine.

I came across Invoker on Dawid Weiss's website and I do this:

java -jar Invoker.jar -cpalljars .\ -cpdir .\ <fully qualified classname>

Things work fine.

Why would both using the absolute path to the jars and placing them
in the current working directory still cause NoClassDefFoundError?

Rico.



Relevant Pages

  • Re: my vm wont run .class files
    ... >NoClassDefFoundError ... This one is a bitch. ... Jars are the better way to go anyway. ... Canadian Mind Products, Roedy Green. ...
    (comp.lang.java.help)
  • Re: JAR problem
    ... except for the lib folder... ... I have created the Jar file from. ... Your application can read the jars from the lib ...
    (comp.lang.java.programmer)
  • Re: How do I make package org.apache.axis.encoding exist in netbeans?
    ... So it looks like it can't find package org.apache.axis.encoding. ... You can also attach the JARs directly to the project's classpath, but for a generally useful library like Axis you are right to pursue the library approach. ... Again, the JARs constitute your classpath, not the folder that holds the JARs. ...
    (comp.lang.java.programmer)
  • Tomcat 4.1.27 and no class deff found errors?
    ... This seems the case with lots of jars. ... in one folder it can't find them in the other. ... javax.servlet.ServletException: Error instantiating servlet class ... Prev by Date: ...
    (comp.lang.java.programmer)