Hi,
If I understand you correctly, you want to use the native libraries
without the TinyOS Java classes. In that case you need to explicitly
load the native libraries. In the TinyOS Java classes this is done in
net.tinyos.comm.TOSCommLibraryLoader.java with the instruction
System.loadLibrary("toscomm");
Alternatively, you can also use the method System.load(...), where you
can specify the full path and file name of the native library (in case
you want to install the native library to a different location).
You can find more details about JNI (the Java native interface) in this
e-book:
http://java.sun.com/docs/books/jni/
Cheers,
Urs
Xiaogang Yang wrote:
> Hi:
>
> I want to develop an application based on the serial communication of
> tinyos2,
> I take use of the libtoscomm JNI stuff, but it seems like always there
> runtime error, such like native function.... seems like the lib is not
> loaded.
>
> I have done following:
> 1 integrated net.tinyos.comm stuff into my project
> 2 copy libtoscomm-32.so and libgetenv-32.so into
> usr/lib/jvm/[java-path]/jre/lib/i386
> 3 I have compiled them
> 4, when running, native_gettossmap error
>
>
> so could someone help me what I should do if I want to make use of the
> serial communication part of tinyos 2 for PC application.
>
> Thank you
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help