Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Destroy JVM hangs the program

SasDutta
Member Posts: 125
Hi
My program hangs when i try to destroy jvm by following statement.
(*jvm)->DestroyJavaVM(jvm);
I have created JVM by following code
Thanks
Sas
Edited by: SasDutta on Jun 16, 2011 10:11 AM
My program hangs when i try to destroy jvm by following statement.
(*jvm)->DestroyJavaVM(jvm);
I have created JVM by following code
int createJVMEnv(void) { JavaVMInitArgs vm_args; JavaVMOption options[15]; int res; if (env != NULL) return SUCCESS; const char * aim_class_path =getenv("AIM_CLASS_PATH"); if( aim_class_path == NULL ) { WriteLog(FATAL, "CLASSPATH variable is not set in the environment\n"); } if(aim_class_path!=NULL) { char buf[5000]; sprintf(buf,"-Djava.class.path=%s",aim_class_path); options[0].optionString=strdup(buf); } options[1].optionString="-DSystemMode=EJB"; options[2].optionString="-Xms512m"; options[3].optionString="-Xmx8192m"; options[4].optionString="-Dfltsked.contextFactory=weblogic.jndi.WLInitialContextFactory"; options[5].optionString="-Dfltsked.remoteObjectLocatorProviderURL=t3://aopcpscm.opc.ual.com:10001"; /*options[5].optionString="-Dfltsked.remoteObjectLocatorProviderURL=t3://aopcqscmapp01.opc.ual.com:7001";*/ options[6].optionString="-Dfltsked.user.loginID=u298724"; options[7].optionString="-Dlog4j.rootLogger=OFF"; options[8].optionString="-Dbatchmode.process=true"; options[9].optionString="-Dweblogic.MaxMessageSize=1000000000"; options[10].optionString="-Dweblogic.StuckThreadMaxTime=600"; options[11].optionString="-Dweblogic.CompleteMessageTimeout=480"; options[12].optionString="-Xcheck:jni"; options[13].optionString="-Xnoclassgc"; options[14].optionString="-Djava.compiler=NONE"; vm_args.version = JNI_VERSION_1_6; vm_args.options = options; vm_args.nOptions = 15; vm_args.ignoreUnrecognized = JNI_TRUE; res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args); if (res < 0) { WriteLog(FATAL, "Can't create Java VM\n"); return FAILURE; } if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionDescribe(env); return NULL; } return SUCCESS; }Can anyone help how can i destroy the jvm? jvm and env are global variable.
Thanks
Sas
Edited by: SasDutta on Jun 16, 2011 10:11 AM
Answers
-
My program hangs when i try to destroy jvmIt is waiting for the other non-daemon threads to exit, as per the documentation.
-
SasDutta wrote:What are you trying to accomplish with that?
(*jvm)->DestroyJavaVM(jvm);
You might want to first investigate if that method does anything. In the past in the Sun/Oracle VM it did little or nothing.
This discussion has been closed.