Hi Mithil,

It is as I thought, you have multiple Java installations (see the actual 
library search path printed by the test program). While TinyOS installs 
the JNI files for java-6-sun, by default you seem to run java-6-openjdk. 
Copy the libtoscomm-32.so and the libgetenv-32.so (or similar) from 
/usr/lib/jvm/java-6-sun/jre/lib/i386 to 
/usr/lib/jvm/java-6-openjdk/jre/lib/i386.

Cheers,
Urs


Mithileash wrote:
> Hi Urs,
> 
> I have run this before as well and I still get the same exception as below:
> 
>  >> 
> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/home/mithil/Documents/TCD
>  
> MS Year1/NEMBES/MOCOA/SharedLibrary:/home/mithil/Documents/TCD MS 
> Year1/NEMBES/MOCOA/InferenceEngine:/home/mithil/Documents/TCD MS 
> Year1/NEMBES/MOCOA/BayesianNetwork:/home/mithil/Documents/TCD MS 
> Year1/NEMBES/MOCOA/RTE:/home/mithil/Documents/TCD MS 
> Year1/NEMBES/MOCOA/CRL-FRW:/home/mithil/Documents/TCD MS 
> Year1/NEMBES/MOCOA/RTEProximity:.:/usr/java/packages/lib/i386:/lib:/usr/lib
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no getenv in 
> java.library.path
>    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1698)
>    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
>    at java.lang.System.loadLibrary(System.java:1047)
>    at LibTest.main(LibTest.java:5)
> 
> can you please tell me what I should do ? thanks for your help so far.
> 
> regards,
> Mithil
>> Hi Mithileash,
>>
>> If you have multiple versions of Java installed, it is possible that 
>> tos-locate-jre thinks you are using a different version and installs 
>> the JNI files in the wrong place.
>>
>> This is a common problem and you can find instructions on how to debug 
>> your installation for instance in the following mail:
>> http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2009-January/037776.html
>>  
>>
>>
>> Please try the Java program attached to the mail in the link above and 
>> copy the output from that program if you need more help.
>>
>> Cheers,
>> Urs
>>
>>
>> Mithileash wrote:
>>> HI all,
>>>
>>>
>>> I am new to Tiny OS, and I am encountering the problem Toscomm JNI 
>>> library not found when I run the TestSerial java file(java TestSerial 
>>> -comm serial@/dev/ttyUSB0:mica2). Additional Info:
>>>
>>> 1. I have installed the tos-install-jni and it is successfully 
>>> installed without any problems. I can confirm this because when I run 
>>> tos-locate-jre --jni the following is printed
>>>     /usr/lib/jvm/java-6-sun/jre/lib/i386
>>>
>>> 2. I am running Ubuntu Jaunty 9.04
>>>
>>>
>>> I have tried searching for a solution in the mailing list but none of 
>>> the provided solutions work for me. Any help is much greatly 
>>> appreciated.
>>>
>>> Thanks,
>>> Mithil
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> [email protected]
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
> 

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to