Hi guys,
I am getting back into the cattle drive assignment where I had left off on
Servlets (Reverse-2). I tried running orion using
java -jar orion.jar but received an error..
C:\orion>java -jar orion.jar
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
I looked up what the error is and it told met that my ClassPath is not correct. I then tried javac if I can compile any of my old java program and it gave me a similar error.
I typed PATH on my command line and it gave me...
C:\orion>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files\jEdit;C:\Program Files\Java\jdk1.6.0_2
5\bin\bin;C:\Program Files\QuickTime\QTSystem\
Sure enough my classpath has an extra ...\bin at the end. Removed it and is able to compile using javac . However, java -jar orion.jar is still giving me a problem.
I then read online that I can type the whole path..."C:\Program Files\Java\jdk1.6.0_25\bin\java.exe" -jar orion.jar. And boom it worked which tells me jdk is working fine.
Question: Why is it that my javac is working without specifying the whole path while java does not?
What am I missing here. To me, my classpath is setup correctly and jdk is working fine.
Let me know if I need to explain more.
Thank you in advance.
Gary