Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JNI Destroy/Create JavaVM



Has anyone sucessfully created then destroyed and created another jvm in
a JNI app on OS X?

Something like this.....


JNI_CreateJavaVM(&g_jvm,p_env,p_args);
err = (*g_jvm)->DestroyJavaVM(g_jvm);
JNI_CreateJavaVM(&g_jvm,p_env,p_args);

err is 0 on the destroy call but the following create call always fails with -1.
Any insight?

I also noticed that when destroying the VM not all the threads it creates are
destroyed. I suspect the system threads (Finalizer, Reference Handler,CompileThread0, etc..)
might not be destroyed by DestroyJavaVM. They are daemon threads.
Could this have something to do with it?

Thanks.
Topher
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.