Hi, Unless you need to be compatible with older versions of Java you do not need to compile for version 1.4 (simply remove the -target and -source options).
How did you install TinyOS? Clearly, your installation seems to be missing some files for the TinyOS Java libraries and tinyos.jar seems to be incomplete. Can you try the latest tinyos.jar from and let us know if this works? https://tinyos-main.googlecode.com/svn/trunk/support/sdk/java/tinyos.jar Cheers, Urs On 03/15/2011 10:43 AM, Flemming Nyboe wrote: > Hello, > > After following advice in e.g. > > http://www.mail-archive.com/[email protected]/msg36117.html > > Java still has problems finding packages/symbols, when compiling TestSerial > > If is set CLASSPATH to the .jar file, it cannot find the packages: > > ------------- > > FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial > > $ printenv CLASSPATH > > c:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;. > > FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial > > $ make tinynode > > mkdir -p build/tinynode > > javac -target 1.4 -source 1.4 *.java > > TestSerial.java:35: package net.tinyos.message does not exist > > import net.tinyos.message.*; > > <more errors> > > ------------- > > If is set CLASSPATH to the java path, it finds the packages, but not the > symbols: > > ------------ > > FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial > > $ printenv CLASSPATH > > c:\cygwin\opt\tinyos-2.x\support\sdk\java;. > > FNE@21TT14J /opt/tinyos-2.x/apps/tests/TestSerial > > $ make tinynode > > mkdir -p build/tinynode > > javac -target 1.4 -source 1.4 *.java > > c:\cygwin\opt\tinyos-2.x\support\sdk\java\net\tinyos\message\Message.java:84: > cannot find symbol > > symbol : class SerialPacket > > location: class net.tinyos.message.Message > > private SerialPacket serialPacket; > > <more errors> > > ------------- > > Additional info: > > ------------- > > FNE@21TT14J /opt/tinyos-2.x/support/sdk/java > > $ ls -l > > total 174 > > -rw-r--r-- 1 FNE mkgroup-l-d 432 Aug 31 2007 Makefile > > -rw-r--r-- 1 FNE mkgroup-l-d 2750 Jul 12 2006 Makefile.include > > -rw-r--r-- 1 FNE mkgroup-l-d 565 Aug 15 2007 build.xml > > drwxr-xr-x+ 3 FNE mkgroup-l-d 0 Jan 28 13:41 net > > -rwxr-xr-x 1 FNE mkgroup-l-d 168939 Mar 19 2010 tinyos.jar > > FNE@21TT14J /opt/tinyos-2.x/support/sdk/java > > $ which java > > /cygdrive/c/Program Files/Java/jdk1.6.0_23/bin/java > > FNE@21TT14J /opt/tinyos-2.x/support/sdk/java > > $ java -version > > java version "1.6.0_23" > > Java(TM) SE Runtime Environment (build 1.6.0_23-b05) > > Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing) > > FNE@21TT14J /opt/tinyos-2.x/support/sdk/java > > $ which javac > > /cygdrive/c/Program Files/Java/jdk1.6.0_23/bin/javac > > -------------- > > Any suggestions? > > Is “javac -target 1.4 -source 1.4 *.java” wrong, when my actual java > version is higher? > > Regards Flemming _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
