A DESCRIPTION OF THE REQUEST :
Dynamic libraries can be loaded by the virtual machine at run time, but they are unloaded by the kernel when the application ends.
This means that static resources allocated by the DLL will be allocated in the current thread of the JVM at the point when the library is loaded, but disposed in the primordial thread when the kernel cleans up.
Please supply a parameter to have the launcher create the JVM in the primordial thread to maintain compatibility, or somehow free the dynamically loaded libraries in the thread in which they were loaded.
JUSTIFICATION :
Deallocating resources in another thread than the one in which they were created is potentially dangerous and can cause corruption and crashes.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The destructors of static objects allocated in a DLL loaded on run time must be called from the same thread as the one which called their constructors.
ACTUAL -
The destructors are called from a different thread than the constructors.
CUSTOMER SUBMITTED WORKAROUND :
By not using the standard Java launcher, but instead writing your own, you can force the JVM to be loaded in the primordial thread.