Strange NoClassDefFound:java not finding class but javap finding it
843810Jul 2 2001 — edited Jul 31 2001I have installed mail.jar and activation.jar in JAVA_HOME/jre/lib/ext which should automatically be on the classpath.
I have a file TransportSendExample.java that imports classes from these jar files.
If I run: javac TransportSendExample.java
It works no problem.
I then try: java TransportSendExample
And I get: Exception in thread "main" java.lang.NoClassDefFoundError: javax.mail.Address
So I try this to see if javap works:
javap javax.mail.Address
And I get everything I would expect:
public abstract class javax.mail.Address extends java.lang.Object
{
//all the methods
}
i.e. javap locates the class.
So what is happening. I cannot see how this could be a classpath problem since javap locates the class.
Any advice would be greatly appreciated.
Tim.