Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Problem Loading DLL(Using JNI)
Problem Loading DLL [message #926290] Fri, 28 September 2012 13:55
Andy Ed is currently offline Andy EdFriend
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. So I have...

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
Previous Topic:Cup *jflex
Next Topic:Get refactoring type & changes
Goto Forum:
  


Current Time: Thu Apr 18 15:12:50 GMT 2024

Powered by FUDForum. Page generated in 0.02352 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top