JNI_CreateJavaVM()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rama_Bharti
Posted On:   Tuesday, November 8, 2005 06:17 AM

Hi, I have an application which load some dlls while launching placed in application folder. Now one of my DLL calls JNI_createJavaVM(). This works fine. But if I increase the number of other dlls placed in same folder, this API crash the Application. The problem is specifically on MacOS. The message dispalyed at Terminal is " # # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://bugreport.apple.com/ # # Java VM: Java HotSpot(TM) Client VM (1.4.2-34 mixed mode) # # Fatal: must be the same thread, quickly #" Can anyone help please? Thanks, Rama    More>>

Hi,

I have an application which load some dlls while launching placed in application folder.

Now one of my DLL calls JNI_createJavaVM(). This works fine. But if I increase the number of other dlls placed in same folder, this API crash the Application. The problem is specifically on MacOS.

The message dispalyed at Terminal is

"
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://bugreport.apple.com/
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-34 mixed mode)
#
# Fatal: must be the same thread, quickly
#"

Can anyone help please?

Thanks,
Rama

   <<Less

Re: JNI_CreateJavaVM()

Posted By:   ajay_gupta  
Posted On:   Wednesday, November 23, 2005 07:21 AM


Hi Rama,
I am facing some problem in creating Java VM. I am trying to create JVM inside a DLL but JNI_createJavaVM() throws an error with error code -1. Following is the code:


int nError = 0;
JavaVMInitArgs sArgs;
JavaVMOption sOptions[2];
JavaVMInitArgs vmArgs;
JavaVM *psMachine = (JavaVM *)0;
void *pvEnv = (void *)0;

sArgs.version = JNI_VERSION_1_2;
JNI_GetDefaultJavaVMInitArgs(&sArgs);

sOptions[0].optionString = "-Djava.compiler=NONE";
sOptions[1].optionString = "-Djava.class.path=.";

sArgs.nOptions = 2;
sArgs.options = sOptions;

nError = JNI_CreateJavaVM(&psMachine, &pvEnv, &sArgs);

nError value comes to -1 which is unknown error. Could you please tell me what could be the error ?


regards
Ajay
About | Sitemap | Contact