[jdom-interest] Problem running samples

Bill Sherlock bdsherlock at juno.com
Sun Mar 17 20:37:32 PST 2002


Hi all,

New to XML, JDOM and having a bit of difficulty running the sample code.
I am running from the command line using win98,jdom-b8, and jdk1.4.0. I
drill down to the directory holding the Count.class file. I tried running
the program using the three methods below and, needless to say as I am
posting here, I got nowhere. I know that Count requires that I supply 2
parameters, which I didn't, but it should tell me the usage, which it
didn't. Any help would be appreciated.

Thanks,
Bill Sherlock

Try #1:

C:\jdom\jdom-b8\build\classes\samples>java -classpath
C:\jdom\jdom-b8\build\jdom.jar;C:\jdom\jdom-b8\lib\xerces.jar Count
Exception in thread "main" java.lang.NoClassDefFoundError: Count

Try #2:
C:\jdom\jdom-b8\build\classes\samples>java Count
Exception in thread "main" java.lang.NoClassDefFoundError: Count (wrong
name: sa
mples/Count)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)

Try #3:
C:\jdom\jdom-b8\build\classes\samples>java -classpath
C:\jdom\jdom-b8\build\jdom
.jar;C:\jdom\jdom-b8\lib\xerces.jar samples.Count
Exception in thread "main" java.lang.NoClassDefFoundError: samples/Count



More information about the jdom-interest mailing list