I sent an email before, and was told that my java installation was ok and
I should place the getenv library in my JRE.

[EMAIL PROTECTED]:[...]/jre1.6.0_06$ find . -iname "*getenv*"
./lib/amd64/libgetenv.so

It appears to be already there,
However, when I try to run the serial forwarder for example:

[EMAIL PROTECTED]:/opt/tinyos2/tinyos-2.x-src/apps/Oscilloscope/java$ java
net.tinyos.sf.SerialForwarder -port 9002 -comm serial@/dev/ttyS0:mica2
The toscomm JNI library was not found.
Check that your tinyos-tools package is installed and try
rerunning tos-install-jni.
Aborting.

How do I properly install jni?
I mean, this tos-install-jni command do not work because nor does
tos-locate-jre work, and all the jars are already placed in my java
installation.



Thanks,
Fernando.

--------------------------- Mensagem Original ----------------------------
Assunto: Re: [Tinyos-help] Trouble regarding Java/JNI
De:      "Michael Schippling" <[EMAIL PROTECTED]>
Data:    Sex, Junho 6, 2008 1:16 pm
Para:    [EMAIL PROTECTED]
CC:      [email protected]
--------------------------------------------------------------------------

The first problem is that you shouldn't put ".java" in the command:
        java Oscilloscope
You should also check that you have both "." and the path to the
TOS java classes or jar in your CLASSPATH. If this is meaningless
to you, search this list and google CLASSPATH.

The second problem is just me, but I believe tos-locate-jre to be
utterly useless. What you need is to have the javax.comm or TOScomm
jar, shared lib, and properties file, and the getenv shared lib in
your JRE. You can hand copy them if you can find them. Jars go in
JRE/lib/ext, javax.comm.properties goes in JRE/lib, and shared libs
in JRE/bin. If you have a copy of your JRE from the old install
they are probably still there, or search this list and google.

MS



[EMAIL PROTECTED] wrote:
> I had previously installed the full package of tinyOS, including its
> dependencies, such as java, the JNI library, etc; And they were all
> working OK. It was on a machine in which ubuntu was running.
>
> Well, some things happened, and we switched to Fedora9.
> I reinstalled tinyOS (with a lot of more trouble as there is no way of
> installing it through the 'yum' command of Fedora), but when I try to run
> some java apps, lots of errors appear, for example, the Oscilloscope
> application.
>
> "[EMAIL PROTECTED]:/opt/tinyos2/tinyos-2.x-src/apps/Oscilloscope/java$ java
> Oscilloscope.java
> Exception in thread "main" java.lang.NoClassDefFoundError:
Oscilloscope/java
> Caused by: java.lang.ClassNotFoundException: Oscilloscope.java
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)"
>
> or:
>
> "[EMAIL PROTECTED]:/opt/tinyos2/tinyos-2.x-src/apps/Oscilloscope/java$ ./run
> getenv JNI library not found. Env.getenv will not work
> (run the tos-install-jni tool, see man tos-install-jni for more details)"
>
>
> I've already set the PATH and JAVA_HOME so they have the java installation
> dir location there, and I also tried using ./update-alternatives --config
> java, and no matter where I say it is, nothing works.
>
> Regarding the JNI library, when I try to install it through the
> tos-install-jni command, it returns 'Java not found, not installing JNI
> code', but hell, there IS java installed !!!!! And nor do tos-locate-jre
> --java or tos-locate-jre --jni return its path ! they do not display
> anything at all.
>
> I simply don't know what should I do.. These java stuff are just... Ahw,
> driving me mad
>
>
> Any possible solutions?
> (ps.: saying to rerun tos-install-jni or anything related to it will not
> help at all, because the tos-locate-jre --* do not return anything, as it
> should (and yes, I'm absolutely sure that java is installed, even more
> than once actually, and none of its installations are recognized there))
>
>
>
>
>
> Thanks, Fernando
>
> _______________________________________________
> 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

Reply via email to