I don't have the whole T2 system installed so I can't provide an
opinion on how good the code generation is, but this is a problem:
> $which java
> /cygdrive/c/WINDOWS/system32/java
>
It should point to the same directory as your javac, so either
your Java install is incomplete or some other weired thing is going on.
It may be that the Widows version of Java is creating a bad Mig file.
Also you have your Java in "Program Files" and the shell is very
finicky about spaces in paths. You can work around it with multiple
versions of "''"'s but it's easier to force it to install in
something like C:/Java/... There are options to put both the JDK
and the JRE in a custom directory if you watch the install screens
like a hawk.
MS
salvatore galati wrote:
hi.
I'have a problem with javac on tinyOs 2.x
i have installed java jdk 1.5.0_15
I want to create the file BlinkToRadioMsg.java and BlinkToRadioMsg.class BUT
------------------------------------------------------------------------------------------------
I edit the file Makefile in /opt/tinyos-2.x/apps/tutorials/BlinkToRadio:
COMPONENT=BlinkToRadioAppC
BUILD_EXTRA_DEPS=BlinkToRadioMsg.class
BlinkToRadioMsg.class: $(wildcard *.java) BlinkToRadioMsg.java
javac *.java
BlinkToRadioMsg.java:
mig java -target=null -java-classname=BlinkToRadioMsg BlinkToRadio.h
BlinkToRadioMsg -o $@
include $(MAKERULES)
------------------------------------------------------------------------------------------------
when i type make telosb this is the result:
$make telosb
mkdir -p build/telosb
javac *.java
BlinkToRadioMsg.java:136: invalid method declaration; return type required
public get_nodeid() {
BlinkToRadioMsg.java:137: illegal start of expression
return ()get(offsetBits_nodeid(), 16);
BlinkToRadioMsg.java:137: ')' expected
return ()get(offsetBits_nodeid(), 16);
BlinkToRadioMsg.java:143: <identifier> expected
public void set_nodeid( value) {
BlinkToRadioMsg.java:223: ')' expected
5 errors make: *** [BlinkToRadioMsg.class] Error 1
----------------------------------------------------------------------------------------------
this errors are the same as errors creates by calling "make telosb" on (
for example) /opt/tinyos-2.x/apps/tests/TestSerial ( to create the file
TestSerialMsg.java)
i have set :
CLASSPATH='C:\Program
Files\UCB\cygwin\opt\tinyos-2.x\support\sdk\java;.' ( all files .java
in subdirectories are already compiled)
PATH=......../cygdrive/c/Program
Files/Java/jdk1.5.0_15/bin:/cygdrive/c/Program
Files/Java/jdk1.5.0_15/jre/bin:.........etc etc
$which java
/cygdrive/c/WINDOWS/system32/java
$which javac
/cygdrive/c/Program Files/Java/jdk1.5.0_15/bin/javac
$ tos-locate-jre --jni
/cygdrive/c/Program Files/Java/jdk1.5.0_15/jre/bin
$ tos-locate-jre --java /cygdrive/c/Program Files/Java/jdk1.5.0_15/bin
$ tos-locate-jre --javac
/cygdrive/c/Program Files/Java/jdk1.5.0_15/bin
$ tos-install-jni
Installing 32-bit Java JNI code in /cygdrive/c/Program
Files/Java/jdk1.5.0_15/jre/bin ...
done.
BUT
$ java net.tinyos.tools.Listen
getenv JNI library not found. Env.getenv will not work
(run the tos-install-jni tool, see man tos-install-jni for more details)
Error on [EMAIL PROTECTED]:9002 <mailto:[EMAIL PROTECTED]:9002>:
java.net.ConnectException: Connection refused: connect
thank you very much
------------------------------------------------------------------------
Windows Live Messenger Prova il nuovo Messenger 2008, รจ GRATIS!
<http://www.messenger.it>
------------------------------------------------------------------------
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help