Andrey:)
26th January 2006, 10:15 PM
Hello guy, iam newbie with Java and trying to learn.
I was expiriwncing problems with KeyboardReader method. So i thought it was due to old version of Java libs but i have updated them all . Whenever i write some program where KeyboardReader method needs to be used, after succsesfull compilation the program gives me this eror :
[root@localhost Java]# javac KbRdPr.java
[root@localhost Java]# java KbRdPr
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: KeyboardReader
at java.lang.VMClassLoader.transformException(java.la ng.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Cla ss) (/usr/lib/libgcj.so.6.0.0)
-bash: [root@localhost: command not found
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
at KbRdPr.main(java.lang.String[]) (Unknown Source)
at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: Script not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(java.lang.String ) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
...5 more
Could it be Because of my KeyboardReader.class file is in the same directory or does it need to be placed in particular directory?
Please help newbie.:)
I was expiriwncing problems with KeyboardReader method. So i thought it was due to old version of Java libs but i have updated them all . Whenever i write some program where KeyboardReader method needs to be used, after succsesfull compilation the program gives me this eror :
[root@localhost Java]# javac KbRdPr.java
[root@localhost Java]# java KbRdPr
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: KeyboardReader
at java.lang.VMClassLoader.transformException(java.la ng.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Cla ss) (/usr/lib/libgcj.so.6.0.0)
-bash: [root@localhost: command not found
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
at KbRdPr.main(java.lang.String[]) (Unknown Source)
at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: Script not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(java.lang.String ) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
...5 more
Could it be Because of my KeyboardReader.class file is in the same directory or does it need to be placed in particular directory?
Please help newbie.:)