April 16th, 2005, 09:28 PM
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
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
April 16th, 2005, 10:24 PM
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
April 16th, 2005, 10:34 PM
KURIOUS YOU FREAKING ROCK! THANK YOU SOOOO MUCH! Gosh, dang I am one happy camper now! I really appreciate it.
Originally Posted by kurious