#1
  1. I fail at spelling
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Sep 2003
    Location
    NDAuNjIxMTExLC03OS4xNTU=
    Posts
    3,232
    Rep Power
    1775

    java.lang.NoClassDefFoundError: javax/comm/UnsupportedCommOperationException


    Hey,

    This is one really messed up problem. I created it using Sun One and also Netbeans. In BOTH IDE's the program runs perfectly. Even from the command line it will compile fine. Like "javac seniorproject.java" compiles fine to seniorproject.class. NO errors at all!

    The problem, when I do the typical "java programName" after running the compiler for the class it gives me this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/UnsupportedCommOperationException" ... Now, I read all I can on this error and all say that it is not installed correctly if you get this error. Well, it works in the IDE, and also worked on both JDK1.2 and JDK 1.5. Now, can anyone point me in the right direction? I am looking to have a simple command line that I just say "java programName 1 2 3" and it does it's thing.

    Any help I would really appreicate. This being the last problem I have to figure out and my senior project for my BS is finished.

    I have tried:
    C:\java>"C:\Program Files\Java\jdk1.5.0_02\bin\javac" -classpath "C:\Program Files\Java\jdk1.5.0_02\jre\lib\ext\comm.jar" seniorproject.java
    C:\java>java seniorproject
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/UnsupportedCommOperationException

    Can anyone help me please? I am running WindowsXP with SP2 and it works PERFECTLY in all the IDE's I tried. Sun One and NetBeans 3.0. Please help.

    Chad R. Smith
  2. #2
  3. Prom night: 1973
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Dec 2001
    Posts
    1,156
    Rep Power
    24
    set PATH=%PATH%;"C:\Program Files\Java\jdk1.5.0_02\bin"

    javac -classpath .;"C:\Program Files\Java\jdk1.5.0_02\jre\lib\ext\comm.jar" seniorproject.java

    java -cp .;"C:\Program Files\Java\jdk1.5.0_02\jre\lib\ext\comm.jar" seniorproject

    Comments on this post

    • chadsmith729 agrees : Right on the money!
  4. #3
  5. I fail at spelling
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Sep 2003
    Location
    NDAuNjIxMTExLC03OS4xNTU=
    Posts
    3,232
    Rep Power
    1775
    Originally Posted by kurious
    set PATH=%PATH%;"C:\Program Files\Java\jdk1.5.0_02\bin"

    javac -classpath .;"C:\Program Files\Java\jdk1.5.0_02\jre\lib\ext\comm.jar" seniorproject.java

    java -cp .;"C:\Program Files\Java\jdk1.5.0_02\jre\lib\ext\comm.jar" seniorproject
    KURIOUS YOU FREAKING ROCK! THANK YOU SOOOO MUCH! Gosh, dang I am one happy camper now! I really appreciate it.

    Chad

IMN logo majestic logo threadwatch logo seochat tools logo