Hi Samarjit, I think, your CLASSPATH is not correct. The javac does not find the imports. I don't know, how it is in windows/cygwin.
Be sure, to have a CLASSPATH like this: CLASSPATH=.:$TOSROOT/support/sdk/java/tinyos.jar I mean, your current directory "." and the tinyos.jar have to be involved. When I set my CLASSPATH to this, it works properly. Best, Martin Quoting samarjit das <[email protected]>: > Hi, I tried to compile TestSerial application > (\opt\tinyos-2.x\apps\tests\TestSerial) > but received the following error : > > ********************************************** > samar...@ict23-27 ~ > $ cd / > samar...@ict23-27 / > $ cd opt/tinyos-2.x/apps/tests/TestSerial/ > samar...@ict23-27 /opt/tinyos-2.x/apps/tests/TestSerial > $ make shimmer > mkdir -p build/shimmer > javac -target 1.4 -source 1.4 *.java > TestSerial.java:35: package net.tinyos.message does not exist > import net.tinyos.message.*; > ^ > TestSerial.java:39: cannot find symbol > symbol: class MessageListener > public class TestSerial implements MessageListener { > ^ > TestSerial.java:41: cannot find symbol > symbol : class MoteIF > location: class TestSerial > private MoteIF moteIF; > ^ > TestSerial.java:43: cannot find symbol > symbol : class MoteIF > location: class TestSerial > public TestSerial(MoteIF moteIF) { > ^ > TestSerial.java:68: cannot find symbol > symbol : class Message > location: class TestSerial > public void messageReceived(int to, Message message) { > ^ > TestSerialMsg.java:7: package net.tinyos.message does not exist > public class TestSerialMsg extends net.tinyos.message.Message { > ^ > TestSerialMsg.java:67: package net.tinyos.message does not exist > public TestSerialMsg(net.tinyos.message.Message msg, int base_offset) { > ^ > TestSerialMsg.java:76: package net.tinyos.message does not exist > public TestSerialMsg(net.tinyos.message.Message msg, int base_offset, int > da > ta_length) { > ^ > TestSerial.java:100: cannot find symbol > symbol : class MoteIF > location: class TestSerial > MoteIF mif = new MoteIF(phoenix); > ^ > TestSerial.java:100: cannot find symbol > symbol : class MoteIF > location: class TestSerial > MoteIF mif = new MoteIF(phoenix); > ^ > TestSerialMsg.java:18: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:24: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:33: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:42: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:51: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:60: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:69: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:78: cannot find symbol > symbol : method amTypeSet(int) > location: class TestSerialMsg > amTypeSet(AM_TYPE); > ^ > TestSerialMsg.java:134: cannot find symbol > symbol : method getUIntBEElement(int,int) > location: class TestSerialMsg > return (int)getUIntBEElement(offsetBits_counter(), 16); > ^ > TestSerialMsg.java:134: inconvertible types > found : getUIntBEElement > required: int > return (int)getUIntBEElement(offsetBits_counter(), 16); > ^ > TestSerialMsg.java:141: cannot find symbol > symbol : method setUIntBEElement(int,int,int) > location: class TestSerialMsg > setUIntBEElement(offsetBits_counter(), 16, value); > ^ > 21 errors > make: *** [TestSerial.class] Error 1 > > ********************************************************** > The same error has been appeared for command 'make telosb' too. > I thought it may be the problem with java configuration..so I tried to > properly configure the java installation as follow: > > Installation: > >First, for Windows Environment Variables, I've added the java path > > ************************************************************ > Variable name: PATH > ------------------------------------------------------------ > Variable value: C:\Program Files\Java\jdk1.6.0_13\bin; > > ************************************************************ > > >Next, I've tried to install the TinyOS native libraries for Java: > > ****************************************************** > samar...@ict23-27 ~ > $ tos-locate-jre --jni > /cygdrive/c/Program Files/Java/jdk1.6.0_13/jre/bin > samar...@ict23-27 ~ > $ tos-install-jni > Installing 32-bit Java JNI code in /cygdrive/c/Program > Files/Java/jdk1.6.0_13/jr > e/bin ... > done. > > ****************************************************** > > So it has been installed successfully. But still the same error > message...while compiling TestSerial application (as mentioned above). > > I'll appreciate for any suggestion regarding this. > > Thank you. > > with regards > Samarjit. > > > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
