-----Original Message-----
From: Jo Uthus [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 27, 2000 1:31 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: JNI and Dead Thread on Linux
[EMAIL PROTECTED] wrote:
| Q1:
|
| command line command "ps -a" shows 4 java (JVM) running.
| Why there are so many JVMs running, and what they are for?
Threads in Linux show up as processes when using 'ps' or 'top'.
[Lee]
But the code has only a infinity loop and doesn't create any thread
or process.
| Q2:
|
| I want to load *.so file in a class other than java application's
| public class. In this way, the shared lib files are loaded only
| when they are needed. But the following code doesn't work.
|
[snip]
| System.loadLibrary("MsgImpl");
[snip]
| Got an error msg when run it, the error msg is:
| "java.lang.UnsatisfiedLinkError: ShowMessage at
| ShowMsgBox.main(ShowMsgBox.java:6)"
Try putting libMsgImpl.so in /usr/local/java/jre/lib/i386/ (or
wherever you have your javaVM located)
| What did I do wrong?
cp libMsgImpl.so /usr/local/lib/javanative/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/javanative/
[Lee]
I follow your instruction and put libMsgImpl.so in
/usr/local/jdk118_v1/bin/i686/native_threads, and
/usr/local/jdk118_v1/lib/i686/native_threads, and
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/jdk118_v1/lib/i686/native_thread
s
But the same problem is still there. I think libMsgImpl.so is loaded OK,
otherwise
error will be like "libMsgImpl.so not found". The problem is why I couldn't
call a native
function declared in a class other than java application's public class.
--
Jo Uthus | e-mail: [EMAIL PROTECTED] (private)
Software Engineer | e-mail: [EMAIL PROTECTED] (work)
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]