Help for .NoClassDefFoundError
843810Oct 15 2001 — edited Jan 3 2002Hi, everyone:
When I did my Program I encountered some problems: I downloaded the lastest version of SDK 2 from Sun and install it and set path and classpath in autoexec.bat according to instructions of sun and the previous artical about set path and classpath in this forum.(set classpath=%classpath%. path=C:\jdk1.3\bin;C:;C:\jdk1.3\jre\bin;C:\Program Files\JavaSoft\JRE\1.3\bin
When I compile the program javac works well. But when I use java to intepreter file the system display some error messages.
They are :
1)Exception in thread "main"java.lang.NoClassDefFoundError: Hello
*****************************************
2)Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jdk1.3.1_01\jre\bi
n\awt.dll: An attempt was made to load a program with an
incorrect format
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1298)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:53)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:41)
at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
at java.awt.Component.<clinit>(Component.java:356)
at Hello.main(Hello.java:9)
******************************************
my code is used : javax.swing.JOptionPane. Code is no problem. I tested it on my freind's Computer.
Some other programs work well on my computer without swing.
My OS is win98. sdj1.3.1. Would you please tell me what's going on my machine? I need you guys help! Thanks a lot!
Seine