First check that this directory exists and
that the sub-dirs contain compiled class files:
C:/cygwin/opt/tinyos-2.x/support/sdk/java"
Then set your CP like this (which adds the current dir and
the tos tools dir to whatever else is already set):
export CLASSPATH=".;C:/cygwin/opt/tinyos-2.x/support/sdk/java;$CLASSPATH"
Note that the "/cygdrive/c/opt..." syntax only works for cygwin
and bash shell utils, it is otherwise just a red herring on the
path to everything else.
If there are no class files, there is probably a makefile to build
them. Or more likely, I think T2 ships with a jar file for all the
tools. I don't have T2, and don't plan to...so search the doc and
tree for likely candidates. To use the jar file instead, replace
the [] items with the right names:
export CLASSPATH=".;C:/cygwin/opt/tinyos-2.x/[path]/[file.jar];$CLASSPATH"
This should make Listen work as well. I think what went wrong with
that compile is that you were not in the tools base dir:
> Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
> $ javac -classpath . net/tinyos/tools/Listen.java
> error: cannot read: net/tinyos/tools/Listen.java
> 1 error
It should work if you are in C:/cygwin/opt/tinyos-2.x/support/sdk/java
(assuming of course that that is where everything is...)
Do some googling of Java CLASSPATH doc to get a better idea of what's what.
hope this helps
MS
Nicole Caruso wrote:
Hello, I am an undergrad student who just started research under a professor
about sensor networks. When following Lesson 11 of the TinyOS tutorial, I keep
on getting the following errors:
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ make micaz sim
mkdir -p build/micaz
javac RadioCountMsg.java
RadioCountMsg.java:7: package net.tinyos.message does not exist
public class RadioCountMsg extends net.tinyos.message.Message {
^
RadioCountMsg.java:67: package net.tinyos.message does not exist
public RadioCountMsg(net.tinyos.message.Message msg, int base_offset) {
^
RadioCountMsg.java:67: RadioCountMsg(byte[],int) is already defined in
RadioCountMsg
public RadioCountMsg(net.tinyos.message.Message msg, int base_offset) {
^
RadioCountMsg.java:76: package net.tinyos.message does not exist
public RadioCountMsg(net.tinyos.message.Message msg, int base_offset, int
data_length) {
^
RadioCountMsg.java:76: RadioCountMsg(byte[],int,int) is already defined in
RadioCountMsg
public RadioCountMsg(net.tinyos.message.Message msg, int base_offset, int
data_length) {
^
RadioCountMsg.java:18: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:24: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:33: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:42: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:51: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:60: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:69: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:78: cannot find symbol
symbol : method amTypeSet(int)
location: class RadioCountMsg
amTypeSet(AM_TYPE);
^
RadioCountMsg.java:134: cannot find symbol
symbol : method getUIntBEElement(int,int)
location: class RadioCountMsg
return (int)getUIntBEElement(offsetBits_counter(), 16);
^
RadioCountMsg.java:141: cannot find symbol
symbol : method setUIntBEElement(int,int,int)
location: class RadioCountMsg
setUIntBEElement(offsetBits_counter(), 16, value);
^
15 errors
make: *** [RadioCountMsg.class] Error 1
***************************************************************
Here is my PATH:
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ export PATH="/cygdrive/c/Program Files/Java/jdk1.5.0_07/bin:.:$PATH"
***************************************************************
The following classpaths have not solved the problem:
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ export CLASSPATH="/cygdrive/c/cygwin/opt/tinyos-2.x/support/sdk/java"
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ javac -classpath . net/tinyos/tools/Listen.java
error: cannot read: net/tinyos/tools/Listen.java
1 error
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ export
CLASSPATH="/cygdrive/c/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools/Listen.java"
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ CLASSPATH="/cygdrive/c/opt/tinyos-2.x/support/sdk/java"
Nicole [EMAIL PROTECTED] /opt/tinyos-2.x/apps/RadioCountToLeds
$ export
CLASSPATH=".;C:/cygwin/opt/tinyos-2.x/support/sdk/java/net/tinyos/tools/java;$CLASSPATH"
Thank you very much in advance.
Nicole Caruso
Computer Engineering
Rutgers 2008
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help