Hi
I'm trying to create Java VM (JNI_CreateJavaVM) from a C++ application
on Suse 64 using IBM JDK v1.4.2, but getting error code -4, which means
"ENOMEM".
But looks like issue is not related to memory (we have tried changed VM
heap and stack sizes). When i switch on "verbose:jni", i see following
error message -
- JVMJ9VM019E Fatal error: Unable to find and initialize required
class java/lang/Object
- JVMJ9VM020I Searched in
/home/snarasi1/zeus/katana_Linux64/install/java/jre/lib/jclSC14/classes.zip
- JVMJ9VM020I Searched in
/home/snarasi1/zeus/katana_Linux64/install/java/jre/lib/core.jar
- JVMJ9VM020I Searched in
/home/snarasi1/zeus/katana_Linux64/install/java/jre/lib/.....(all other
jar files present in jre/lib/)
- JVMJ9VM023I This may indicate that JAVA_HOME is incorrect, or that
class libraries are not installed
- JVMJ9VM015W Initialization error for library jclscar_22(13):
JVMJ9VM009E J9VMDllMain failed
JDK is properly installed and normal java application is working fine.
Any help would be appreciated!
Thanks & Regards,
Naresh
dinrat@gmail.com - 31 Mar 2006 12:44 GMT
For the same issue, the problem comes if I link my executable to
libz.so.1 on Suse Linux 64. It might be related to libj9zlib22.so and
libz.so.1 integration. Any clues?
Gordon Beaton - 31 Mar 2006 13:01 GMT
> I'm trying to create Java VM (JNI_CreateJavaVM) from a C++
> application on Suse 64 using IBM JDK v1.4.2, but getting error code
> -4, which means "ENOMEM".
What (java related) dependencies does ldd say that your C++ launcher
has?
What directories are in your LD_LIBARY_PATH?
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
dinrat@gmail.com - 01 Apr 2006 16:29 GMT
The jvm gets created fine and I am able to do findClass getMethodId etc
and run java code from my sample app if that does not link with
libz.so.1 though as soon as I link (its just linking, I dont use any
symbol from libz) my sample app with libz it fails to create jvm.
The ldd dependences and LD_LIBRARY_PATH looks fine as after if I dont
link with libz it works fine.
Gordon Beaton - 01 Apr 2006 17:13 GMT
> The jvm gets created fine and I am able to do findClass getMethodId
> etc and run java code from my sample app if that does not link with
> libz.so.1 though as soon as I link (its just linking, I dont use any
> symbol from libz) my sample app with libz it fails to create jvm.
And did you think of mentioning these things in your orignal post?
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
dinrat@gmail.com - 04 Apr 2006 12:05 GMT
We had not found this out till that time. It was only later on after we
were experimenting with things we figured this out.
Dinesh