I’ve created on windows 7, an ignition driver module based on a CAN driver with a PEAK pc-card
The card is provided with a driver with java class which use a dll providing native fonction.
An initialisation class load the dll :
System.loadLibrary("PCANBasic_JNI"); or System.load("D:/Appli/eco2charge/Jprojects/libPeak/32-bit/PCANBasic.dll"); System.load("D:/Appli/eco2charge/Jprojects/libPeak/32-bit/PCANBasic_JNI.dll");
All is fine excepted this point :
When I reload my module I’ve an error message indicating that the libary is already loaded.
I need to restart Ignition service each time I reload my module.
I’ve read that the dll is only unloaded when the JVM is restarted.
When the class which load the dll is destroy, the dll is not unloaded.
What is the solution ?
Can we force to unload dll in the module shutdwon