Juergen,
Thank you and all other people responding to my e-mail.
Yes, you are right. I forgot to change the function name in C file after
moved the native function declaration into another java class. Sorry for
the careless mistake.
Regards,
Lee
-----Original Message-----
From: Juergen Kreileder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 27, 2000 5:24 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: JNI and Dead Thread on Linux
>>>>> Lee Xing writes:
Lee> -----Original Message-----
Lee> From: Jo Uthus [mailto:[EMAIL PROTECTED]]
Lee> Sent: Thursday, January 27, 2000 1:31 AM
Lee> To: [EMAIL PROTECTED]
Lee> Cc: [EMAIL PROTECTED]
Lee> Subject: Re: JNI and Dead Thread on Linux
Lee> [EMAIL PROTECTED] wrote:
Lee> | Q1:
Lee> |
Lee> | command line command "ps -a" shows 4 java (JVM) running.
Lee> | Why there are so many JVMs running, and what they are for?
Lee> Threads in Linux show up as processes when using 'ps' or 'top'.
Lee> [Lee]
Lee> But the code has only a infinity loop and doesn't create any thread
Lee> or process.
Java uses threads internally too. E.g. one thread for the GC, one for
handling SIGQUIT, ... You'll get thread dump by sending SIGQUIT to
java (e.g. press Ctrl-\ in shell where you've started java).
Lee> | Q2:
Lee> |
Lee> | I want to load *.so file in a class other than java application's
Lee> | public class. In this way, the shared lib files are loaded only
Lee> | when they are needed. But the following code doesn't work.
Lee> |
Lee> [snip]
Lee> | System.loadLibrary("MsgImpl");
Lee> [snip]
Lee> | Got an error msg when run it, the error msg is:
Lee> | "java.lang.UnsatisfiedLinkError: ShowMessage at
Lee> | ShowMsgBox.main(ShowMsgBox.java:6)"
This means that java can't find the native implementation of
ShowMessage, check the name of your C function.
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]