Unable to Load DLL [message #925373] |
Thu, 27 September 2012 17:03 |
Andy Ed Messages: 64 Registered: December 2009 |
Member |
|
|
Hi all,
I'm trying to load a DLL and get an exception:
... in thread "main" java.lang.UnsatisfiedLinkError: src.Loader.Java_src_Loader_doSomething()I
I added checkLink, and also verified that the dll is on the library path.
public class Loader {
public native int Java_src_Loader_doSomething();
static{
String l = System.getProperty("java.library.path");
SecurityManager s = new SecurityManager();
s.checkLink("test");
System.loadLibrary("test");
}
}
I then get the following from checkLink():
Exception in thread "main" java.lang.ExceptionInInitializerError
at src.Worker.main(Worker.java:10)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.test)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkLink(Unknown Source)
at src.Loader.<clinit>(Loader.java:11)
... 1 more
Any ideas why access would be denied? Presumably the DLL loaded.
I'm using windows 7, 32-bit, with Eclipse Indigo.
Cheers,
Andy
|
|
|
Powered by
FUDForum. Page generated in 0.03393 seconds