Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    san jose, CA

    Unanswered: command line compilatioin error

    Dear Forums members:

    I instralled jdk and xmljar file on my C drive. I put xml file and a batch file

    called wellformed in the same directory. I dragged and dropped two file into command line, then the following

    error message showed up:

    "C:\>echo off
    Exception in thread "main" java.lang.NoClassDefFoundError: dom/Counter."

    I don't know what I did wrong, please give me some advise so I can compile my xml file. I appreciate your help

  2. #2
    Join Date
    Mar 2004
    Try this:

    javac -sourcepath "fullPathToMyJavaFolder" -classpath "myjarfile.jar"

    The error that you received is because compiler can't find some of your classes. With option -classpath you indicates explicitly the path to the classes. -sourcepath indicates where .java files are located.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts