Operating System - HP-UX
1820592 Members
1748 Online
109626 Solutions
New Discussion юеВ

JNI_CreateJavaVM() hangs when called from C

 
Anil Bhatnagar
New Member

JNI_CreateJavaVM() hangs when called from C

I have a single threaded binary and want to add JVM
as another thread in it.

I am using JDK1.41 on HP11.0.
I am linking -ljvm -ljava -llwp and using -mt option too.

But when I run this binary, the Java thread hangs. On using "-verbose:JNI" option,
I saw that it was hanging at
[Dynamic-linking native method java.lang.ClassLoader.findBootstrapClass ... JNI

I'll much appreciate any help in this regard. A similar problem was reported by Johann Niederer on Oct 17, 2002 but the final outcome (whether Java could be run or not) is not appended on itrc.

Request to Johann Niederer- If you read this message, please respond to me at "anilb@cadence.com".

Thanks and regards,
...-
anil
2 REPLIES 2
Nicolas Portais
Frequent Advisor

Re: JNI_CreateJavaVM() hangs when called from C

Hi,

can you give us a example ?

to help you, you have a example in the following link , how to call the JVM in C:
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/JNI_java2.html

Regards,
Nicolas
Anil Bhatnagar
New Member

Re: JNI_CreateJavaVM() hangs when called from C

Nicolar,

Thanks for giving the pointer to document. I found that I had couple of incorrect options (related to debugging) such as -XDebug, -Xnoagent, etc. which were not needed.

Now the Java stuff is invoking all OK.

Regards,
...-
anil