|
From: Ronnie F. <ron...@gm...> - 2011-09-29 15:16:35
|
Hi,
I am new to GridSim, and trying to run through the examples. I am able to
compile the Example01.java, and I see a file Example01.class appear in the
directory. However when I try to run Example01 I get en error message. I
read the FAQ page that talks about my error, but I am still not able to run.
I have tried multiple things, but still no luck. Please help.
There is some ambiguity on the site about how to run the file:
On the FAQ page it says:
* to run type: java -cp %GRIDSIM%\jars\gridsim.jar;. gridsim.example01.Example1
On the Readme file it says:
In Windows: java -cp %GRIDSIM%\jars\gridsim.jar;.
gridsim\example01\Example1
I have tried both versions but I am still getting the error.
%GRIDSIM% for me = C:\eclipse\GridSim
What I have tried is:
C:\Program Files\Java\jdk1.6.0_21\bin>javac -cp
C:\eclipse\GridSim\jars\gridsim.
jar;. C:\eclipse\GridSim\examples\gridsim\example01\Example1.java
C:\Program Files\Java\jdk1.6.0_21\bin>java -cp
C:\eclipse\GridSim\jars\gridsim.j
ar;. C:\eclipse\GridSim\examples\gridsim\example01\Example1
I have also tried:
C:\Program Files\Java\jdk1.6.0_21\bin>java -cp
C:\eclipse\GridSim\jars\gridsim.j
ar;.
C:\eclipse\GridSim\examples\gridsim\example01\gridsim.example01.Example1
This is the directory that Example01.class is stored:
C:\eclipse\GridSim\examples\gridsim\example01
And the following is the error message I receive:
Exception in thread "main" java.lang.NoClassDefFoundError:
C:\eclipse\GridSim\ex
amples\gridsim\example01\Example1
Caused by: java.lang.ClassNotFoundException:
C:\eclipse\GridSim\examples\gridsim
\example01\Example1
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class:
C:\eclipse\GridSim\examples\gridsim\example01\Exa
mple1. Program will exit.
I have tried many things, but am unsure why it is not running. If you could
walk me through where I am going wrong it would be greatly appreciated.
Thanks,
Ronnie Farrell
|