in our project we are loading dll with the help of signed jars. the dll is loading and working fine. but, now the dll has to be unloaded after some operation. I has gone through the api. there it is mentioned that dll once loaded can't be unloaded. no supporting function/method is available in the api or may be I hasn't gone through properly.
I has also noticed that freeLibrary api is available in windows; is that can be used in java or any possibility is there to use windows api in java.
I am explaining one of my thoughts of unloading.
I want to implement this unloading using threads. I wiil create two threads. in one thread I will load dll and I will kill the first thread by assigning null to the thread object and start the thread2 for carrying some other java operation. I hope this will work out because thread itself is a process; if we kill the process the dll will also be terminated as the process itself is getting terminated.
Please, suggest me whether I am thinking in a right manner or not.
Also, please mention if there are any ways to unload the loaded dll.
Any help will be appreciated whole-heartedly.
thank you in advance.