I am using STAF to integrate client side automation. I am using JAVA as a internal framework.
My requirement is to load and unload STAF.dll(As i need to load and unload native methods from JAVA) from JAVA instead of using System.loadLibrary().(Which is the default implementation in STAF to load the library). Can you please suggest is there a way to load dll.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using STAF.. I could see that JSTAF.jar is taking care of loading its native library(JSTAF.dll) under STAFHandle.class file(Its a static block ).. But STAF does not take care of unloading its narive library. This is casuing my Automation scripts failure with error
Failures:
* registerSTAF(com.isg.epo.staf.test): Native Library C:\STAF\bin\JSTAF.dll already loaded in another classloader
java.lang.UnsatisfiedLinkError: Native Library C:\STAF\bin\JSTAF.dll already loaded in another classloader
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Few points to note :-
I need a DLL-handle to unload any native library. Since STAF.jar takes care of loading its dll, i wont get the dll-handle name which i can use it to unload...
My question is, since STAF take care of loading its native libraries, why cant STAF takes care of unloading it during unregistering of JSTAF.jar.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using STAF to integrate client side automation. I am using JAVA as a internal framework.
My requirement is to load and unload STAF.dll(As i need to load and unload native methods from JAVA) from JAVA instead of using System.loadLibrary().(Which is the default implementation in STAF to load the library). Can you please suggest is there a way to load dll.
I'm not sure I understand what you are asking. Sounds like you've looked at the STAF source code to see how its implemented.
Sorry for the confusion,
I am using STAF.. I could see that JSTAF.jar is taking care of loading its native library(JSTAF.dll) under STAFHandle.class file(Its a static block ).. But STAF does not take care of unloading its narive library. This is casuing my Automation scripts failure with error
Failures:
* registerSTAF(com.isg.epo.staf.test): Native Library C:\STAF\bin\JSTAF.dll already loaded in another classloader
java.lang.UnsatisfiedLinkError: Native Library C:\STAF\bin\JSTAF.dll already loaded in another classloader
Few points to note :-
I need a DLL-handle to unload any native library. Since STAF.jar takes care of loading its dll, i wont get the dll-handle name which i can use it to unload...
My question is, since STAF take care of loading its native libraries, why cant STAF takes care of unloading it during unregistering of JSTAF.jar.