That is (I think) definitely the error you get when the
specified top-level class is not in your CLASSPATH.
You show your CP being set with TOSROOT, however if you
are on Widows, Java does not grok cygwin /opt paths.
If your TOSROOT is /opt or some such it won't get it.
Try using the explicit C:/dada/yada/whatever.jar path.
If that is of no use, double check that the class you
want is in a jar in your path with:
jar -tvf whatever.jar
MS
xiaowei wrote:
> Sorry for the mis-typed in the error message, it should be BcastInject
> in the error message
>
> $ java net.tinyos.tools.BcastInject 1 read_log 2
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/tinyos/tools/BcastInject
>
> Xiaowei
> On 6/25/08, *Michael Schippling* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> is it not supposed to be "BcastInject"
> ^
> or was that a mis-typed message?
> MS
>
>
> xiaowei wrote:
>
> Hi, Andrey,
> Yes. The error now is
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> /opt/tinyos-1.x
> $ export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar
>
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> /opt/tinyos-1.x
> $ java net.tinyos.tools.BcastInjet 1 start_sensing 5 1
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/tinyos/tools/BcastInjet
>
> Thanks.
> Xiaowei
> On 6/25/08, *Andrey Gursky* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>> wrote:
>
> Hi xiaowei,
>
> Do you have
> export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
> ?
>
> Andrey
>
>
>
> xiaowei wrote:
>
> Hi,
>
> When I am following the java file on lesson 8 in the tutorial
> and run "java
> net.tinyos.tools.BcastInject <group_id> start_sensing
> <num_samples>
> <interval>". An Exception appears as follow:Can anyone
> give me
> an answer on
> it?Thanks in advance.
>
>
> $ java BcastInject
> Exception in thread "main" java.lang.NoClassDefFoundError:
> BcastInject
> (wrong na
> me: net/tinyos/tools/BcastInject)
> at java.lang.ClassLoader.defineClass0(Native Method)
> at
> java.lang.ClassLoader.defineClass(ClassLoader.java:502)
> at
>
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> 3)
> at
> java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
> at
> java.net.URLClassLoader.access$100(URLClassLoader.java:54)
> at
> java.net.URLClassLoader$1.run(URLClassLoader.java:193)
> at
> java.security.AccessController.doPrivileged(Native Method)
> at
> java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
>
>
>
> Xiaowei
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>
>
>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> <mailto:[email protected]>
>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help