Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unable to Load DLL(I get an AccessControlException)
Unable to Load DLL [message #925373] Thu, 27 September 2012 17:03
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.

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:Suspiciously high number of pre-processor statements in the IASTTranslationUnit
Next Topic:CDT Plugin build
Goto Forum:
  


Current Time: Sun Oct 13 18:01:05 GMT 2024

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

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

Back to the top