import javax.swing.*;

Here's an easy one.

I have just downloaded and installed the Java 2 SDK v1.3.1 Standard Edition. I am unable to import the javax.swing package. I can compile the source code, but when I run it, I receive "NoClassDefFoundError." Am I missing something from my CLASSPATH? Hopefully, there is an easy answer to this.

thanks,

Kevin

[360 byte] By [delta1R] at [2007-9-26 1:40:59]
# 1

"I am unable to import the javax.swing package. I can compile the source code, but when I run it, I receive "NoClassDefFoundError." Am I missing something from my CLASSPATH?"

Yes, you have to complete your CLASSPATH with the path to a jar file which contains your import package (javax.swing.*): c:\jdk1.3.1\jre\lib\rt.jar.

AlinC at 2007-6-29 2:32:01 > top of Java-index,Archived Forums,Swing...
# 2
Thanks for your help. I am now able to import javax.swing.*;
delta1R at 2007-6-29 2:32:01 > top of Java-index,Archived Forums,Swing...