[jdom-interest] Batch File and Classpath

Alex Rosen arosen at novell.com
Fri Aug 8 10:25:22 PDT 2003


The "-jar <jarname>" needs to be the last thing on the command line
before the app args. Try

    java -classpath jdom.jar -jar CampNotes.jar

Alex Rosen
Novell, Inc.

>>> "M Ghazi" <storm at storm.demon.co.uk> 8/8/2003 12:46:43 PM >>>
Hi there

I have a small JARed java application that uses the JDOM classes. I am
using a Windows/DOS batch file to allow the users to double click and
run the java application.

The Following are all installed in the same directory :
    * jdom.jar
    * CampNotes.jar
    * CampNotes.bat

The batch file does the following command :
    java -jar -classpath jdom.jar CampNotes.jar

But I get the following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
org/jdom/JDOMException
        at mad.proj.campnotes.gui.NoteFrame.<init>(NoteFrame.java:67)
        at mad.proj.campnotes.main.CampNotes.main(CampNotes.java:15)

Any one have any ideas why the -classpath is not working? I have never
had problems with it before, just with JDOM.

Thanks in advance.
______________
M Ghazi (Storm)
storm at storm.demon.co.uk 




More information about the jdom-interest mailing list