Paul Johnson
Paul Johnson

Reputation:

Java plugin development with debug interface problem

Hello i'm trying to develop an eclipse plugin (in eclipse) that uses the Java debugging interface and i'm getting the following error:

Access restriction: The type VirtualMachine is not accessible due to restriction on required library /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar

Using the debug interface in a non plugin development project seems to work fine. I think it has something to do with the plugin dependencies but i'm not sure how to fix it.

Upvotes: 2

Views: 624

Answers (1)

Cuga
Cuga

Reputation: 17904

This error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.

* Windows -> Preferences -> Java
  -> Compiler -> Errors/Warnings
* (Project) Properties -> Java Compiler -> Errors/Warnings

Locate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error messages.

Source: http://lkamal.blogspot.com/2008/09/eclipse-access-restriction-on-library.html

Upvotes: 2

Related Questions