[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-java
Subject:    RE: JNI and Dead Thread on Linux
From:       Lee_Xing () Dell ! com
Date:       2000-01-28 6:09:19
[Download RAW message or body]

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:kreilede@issan.cs.uni-dortmund.de]
Sent: Thursday, January 27, 2000 5:24 PM
To: Lee_Xing@exchange.dell.com
Cc: jou@trustix.com; java-linux@java.blackdown.org
Subject: Re: JNI and Dead Thread on Linux


>>>>> Lee Xing writes:

    Lee> -----Original Message-----
    Lee> From: Jo Uthus [mailto:jou@trustix.com]
    Lee> Sent: Thursday, January 27, 2000 1:31 AM
    Lee> To: Lee_Xing@exchange.dell.com
    Lee> Cc: java-linux@java.blackdown.org
    Lee> Subject: Re: JNI and Dead Thread on Linux


    Lee> Lee_Xing@Dell.com 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 java-linux-request@java.blackdown.org
with a subject of "unsubscribe". Trouble? Contact karl@blackdown.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic