There's probably some documentation someplace that explains the JNI
load sequence. But I'd bet no one knows where it is...
thanks
MS
Urs Hunkeler wrote:
> Hi,
>
> I have no idea how/why Java finds libraries not located in one of the
> paths indicated by the program.
>
> I only sporadically use Windows, and I used this program to debug the
> installations on various systems (Windows, Linux, Mac OS X) with
> success. I think, the last time I had to use it was on a Windows system
> and, if I remember correctly, it showed also the JRE/bin directory.
> Since the owner of that system is sick, I cannot currently verify this.
>
> If the installation works even though the lib directory you are using is
> not shown, then I guess there is nothing to worry about :-). If it does
> not run, one should be able to get it to run by moving the libraries
> into one of the directories indicted by this program. The program also
> helps to debug other problems, as with the more detailed error message
> you can see whether the JVM could not find the library, or could not
> load it (e.g. missing access rights, wrong binary format/platform).
>
> Cheers,
> Urs
>
>
> Michael Schippling wrote:
>> Handy little program, thanks....
>> However I'm not sure that it is the whole story. On my Widows box
>> all the Java dlls are in the JRE/bin, not the JDK/bin (ignoring the
>> fact that the Java install insists on making TWO JREs). But the
>> JRE/bin is not listed in the property, which seems to be the regular
>> PATH with some standard JDK and system directories tacked onto the head.
>> Do you know how this works?
>> thx
>> MS
>>
>>
>> Urs Hunkeler wrote:
>>> Hi Harry,
>>>
>>> Attached is a small Java program that first prints the library search
>>> path and then tries to load the TOS native libraries. If it fails,
>>> you get a more detailed error message than with the TOS java libraries.
>>>
>>> Hope this helps.
>>>
>>> Cheers,
>>> Urs
>>>
>>>
>>> Harry Gao wrote:
>>>> Hi all,
>>>>
>>>> When I try to run SerialForwarder, I receive the following error:
>>>>
>>>> The toscomm JNI library was not found.
>>>> Check that your tinyos-tools package is installed and try
>>>> rerunning tos-install-jni.
>>>> Aborting.
>>>>
>>>> And I when do run sudo tos-install-jni, I get
>>>> Installing 32-bit Java JNI code in /usr/lib/i686 ...
>>>> done.
>>>> It seems that this is not the default directory, since when I run
>>>> serialForwarder again, it still says that the package is not found.
>>>> Any idea
>>>> how I can let it find the correct directory?
>>>>
>>>> Thanks!
>>>>
>>>> Harry
>>>
>>> ------------------------------------------------------------------------
>>>
>>> public class LibTest {
>>> public static void main(String[] args) {
>>> System.out.println(">> " + System.getProperty("java.library.path"));
>>> try {
>>> System.loadLibrary("getenv");
>>> System.loadLibrary("toscomm");
>>> } catch(Exception ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>> }
--
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