I'm cc'ing this to the help list for you...
This looks like a runtime error, not compilation...but anyway...
I think you have
CLASSPATH="$TOSROOT/support/sdk/java/tinyos.jar;."
so java should be able to find MessageListener in that tinyos.jar.
First make sure that the CP is really set in the shell environment
where you are running by doing "echo $CLASSPATH". Then make sure
the jar exists by doing "ls -l $TOSROOT/support/sdk/java/tinyos.jar",
and, assuming success, that the class is actually in the jar with:
"jar tvf $TOSROOT/support/sdk/java/tinyos.jar | grep MessageListener"
If all of that is successful I might try re-compiling all of the
java tools (there should be a top level makefile or something) and
changing the CP to point to the dir-tree that contains the new .classes.
I don't have a T2 devsys, but I'd guess something like:
$TOSROOT/support/sdk/java
would contain net/tinyos/message/MessageListener.java and .class
MS
mark karpa wrote:
Hi,
I thank you for your kind help in advance. I try to fix some Java
compilation errors in tinyos-2.x.
I use the code from the following web site:
http://sing.stanford.edu/abbado/RssiSampling.tar
This code basically measures the noise and records the noise data to the
sensor's memory. And the java file gets the data from the memory. I
compiled the code and installed succesfully. The apllication module is
working. But, java file not.It gives the following error when I try to
read the data from the mote's memory:
Exception in thread "main" java.lang.NoClassDefFoundError:
net/tinyos/message/Me
ssageListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I have read so many emails in the email list. These Java compilation
errors are common with Tinyos-2.x.
Do you hava any suggestion to fix this Java problem? or Do you have any
application module to measure noise level in tinyos-1.x using Telos or
Tmotes?
Thanks again for your kind help.
Mark
*/Michael Schippling <[EMAIL PROTECTED]>/* wrote:
A) please send questions to the help list so we can keep a record.
B) What's the problem?
MS
mark karpa wrote:
> Hi,
>
> I have seen your email about java compilation problem in tinyos-2.x
>
> I also came accross similar problems in tinyos-2.x. How did you
fix the
> problem?
>
> My tinyos.sh is as follows:
>
> # script for profile.d for bash shells, adjusted for each users
> # installation by substituting /opt for the actual tinyos tree
> # installation point.
> TOSROOT="/opt/tinyos-2.x"
> export TOSROOT
> TOSDIR="$TOSROOT/tos"
> export TOSDIR
> CLASSPATH="$TOSROOT/support/sdk/java/tinyos.jar;."
> export CLASSPATH
> MAKERULES="$TOSROOT/support/make/Makerules"
> export MAKERULES
> PATH= "/opt/msp430/bin:$PATH"
> export PATH
>
> #Extend path for java
> type java >/dev/null 2>/dev/null || PATH=`/usr/local/bin/locate-jre
> --java`:$PATH
> type javac >/dev/null 2>/dev/null || PATH=`/usr/local/bin/locate-jre
> --javac`:$PATH
> echo $PATH | grep -q /usr/local/bin || PATH=/usr/local/bin:$PATH
>
>
> Any help is greatly appreciated.
>
> Regards,
> Mark
>
>
------------------------------------------------------------------------
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel
>
> > to find your fit.
------------------------------------------------------------------------
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel
<http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
> to find your fit.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help