[Tinyos-help] java Sample 200 20000 errors

Chris Byers Chris.Byers at macb.com
Wed Feb 14 09:56:13 PST 2007


I tried what you suggested and still have the same problem.  My
CLASSPATH is 

.;/opt/tinyos-1.x/tools/java/classes:/opt/tinyos-1.x/tools/java

And MessageListener.class is in 

./tools/java/net/tinyos/message/MessageListener.class

And I still get the same error when doing: java Sample 200 20000.  Do
you have any other ideas as to what may be wrong.  Thanks for your help.

Chris

-----Original Message-----
From: Tony Mancill [mailto:tmancill at wsu.edu] 
Sent: Wednesday, February 14, 2007 12:04 PM
To: Chris Byers
Cc: tinyos-help at Millennium.Berkeley.EDU
Subject: Re: [Tinyos-help] java Sample 200 20000 errors

Chris Byers wrote:
> I am getting the following error when running the command: java Sample
> 200 20000
> 
>  
> 
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/tinyos/message/MessageListener
> 
>  
> 
> Can anyone tell me how I may resolve this?

First, does the MessageListener.class file exist?  To confirm that it
does:

$ cd /opt/tinyos-1.x/
$ find . -name MessageListener.class

(BTW, I'm assuming you're running T1.  Change the cd command
appropriately if you're running T2.)

If the class file is not there, you need to build the tools.

$ cd /opt/tinyos-1.x/tools/java
$ make

This will produce a lot of output, but should complete without errors.

If the class file is there, verify that your CLASSPATH contains a way to
find it, meaning the bit up until ./net/.

$ echo $CLASSPATH

One of the path elements should contain /opt/tinyos-1.x/tools/java.

If the appropriate CLASSPATH element isn't there, export a new
CLASSPATH:

$ export CLASSPATH=$CLASSPATH:/opt/tinyos-1.x/tools/java

Hope that helps,
tony



More information about the Tinyos-help mailing list