-1

I have a problem with Tinyviz, which is a Java simulator. When I run it with the command tinyviz, I get this message on my screen:

java -Dpython.cachedir=/tmp/jython.cache -DDBG= -DSIMDBG= 
net.tinyos.sim.SimDriver -gui Starting SimDriver... 
Simulation random seed 1486964521 Initializing simulator objects... 
Exception in thread "main" java.lang.NoClassDefFoundError: net/tinyos/packet/Platform 
at net.tinyos.message.MessageFactory.instantiateTOSMsg(MessageFactory.java:122) 
at net.tinyos.message.MessageFactory.createTOSMsg(MessageFactory.java:44) 
at net.tinyos.sim.SimCommands.(SimCommands.java:64) 
at net.tinyos.sim.SimDriver.(SimDriver.java:244) 
at net.tinyos.sim.SimDriver.main(SimDriver.java:539) Caused by: java.lang.ClassNotFoundException: net.tinyos.packet.Platform 
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 5 more
karel
  • 122,292
  • 133
  • 301
  • 332

1 Answers1

1

Generally speaking this kind of error is caused by the Java CLASSPATH not being set correctly.

Most software will come with instructions or a shell script or an installer as to how to set it. If not try setting that variable to the base directory containing .class files, or to the location of the jar file.

poolie
  • 9,358