Wednesday, December 9, 2009

Solve the annoyance with Eclipse Access Restriction

Sometimes, you may encounter a problem like this:
is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-

After several times checking, there is no reason to properly explain and your program gets to stuck since no compilation is allowed when error existed.

One way to work around this issue is by resetting the configuration in the Eclipse project properties. Right click the project name, get into its properties and the Java compiler tab. There is an Errors/Warnings line listing there, select it, and update the Forbidden Reference (access rules) into Warning in the Deprecated and restricted API. Then rebuild the project, and problem solved.

Similar errors can be handled in the same way.

No comments:

Post a Comment