Hello friends,
I installed java with the following command:
sudo apt-get update
synaptic
In synaptic i searched for sun-java6-jdk and marked and applied.
After that i wrote a program and complied with javac /java/Hello.java it showed no errors and i run the program with java /java/Hello.java and it shows the follwing errors
Exception in thread "main" java.lang.NoCla ssDefFoundError : java/Hello.java
at gnu.java.lang.M ainThread.run(l ibgcj.so.7)
Caused by: java.lang.Class NotFoundExcepti on: java/Hello.java
at java.lang.Class .forName(libgcj .so.7)
at gnu.java.lang.M ainThread.run(l ibgcj.so.7)
I think it is for not setting classpath and anybody helps me for setting classpath How to set classpath? and where to set classpath? in ubuntu
I installed java with the following command:
sudo apt-get update
synaptic
In synaptic i searched for sun-java6-jdk and marked and applied.
After that i wrote a program and complied with javac /java/Hello.java it showed no errors and i run the program with java /java/Hello.java and it shows the follwing errors
Exception in thread "main" java.lang.NoCla ssDefFoundError : java/Hello.java
at gnu.java.lang.M ainThread.run(l ibgcj.so.7)
Caused by: java.lang.Class NotFoundExcepti on: java/Hello.java
at java.lang.Class .forName(libgcj .so.7)
at gnu.java.lang.M ainThread.run(l ibgcj.so.7)
I think it is for not setting classpath and anybody helps me for setting classpath How to set classpath? and where to set classpath? in ubuntu
Comment