Dear All,
Please help me ASAP if u can...
I have a very strange problem, I created a very small java project containing only one class, this class contains only a main method having a System.out.println("Hello");
I generated a jar file for this project to be able to run this jar on a linux environment and it already run succesfully using the follwing command
java -cp myJar.jar test.MyClass
The PROBLEM now is when I ONLY add this line to the class "import java.util.ArrayList;" and generate the jar and execute the same command, unfortunately, it gives me Exception in thread "main" java.lang.NoClassDefFoundError: test/MyClass
UNBELIVABLE !!!!!
please note that I am using eclipse to compile with a JRE version 1.6.0_02 and the java version running on linux is jre1.5.0_09
Please Please help me ASAP, I have been trying to fix this problem 2 days ago and no way to solve it..
Thanks in advance
Bookmarks