Tag Archives: Access restriction: The type ‘BASE64Decoder’ is not API

[Solved] Eclipse Error: Access restriction: The type ‘BASE64Decoder’ is not API

Today, after updating the code from SVN, due to the use of base64encoder in the code

The following error is reported after updating: access restriction: the type ‘base64decoder’ is not API (restriction on required library’d:// Java/jdk1.7.0)_ 45\jre\lib\rt.jar’)

In fact, the solution is very simple. Just remove and add the JRE system library

Methods: right click the project – > Properties–> Java build path, switch to the libraries tab page, find the JRE system library, remove it, and then click add library – > Just add JRE system library.

1. Right click the project – properties – Java build path – JRE system library – access rules – resolution and select accessible. Fill in * * below and click OK

2.When writing java code in MyEclipse, base64decoder, import sun. Misc. Base64decoder are used;

However, eclipse prompts: access restriction: the type base64decoder is not accessible due to restriction on required library c: (program files) \\\\\\\\\\\\\\\\\\\\\\\\

Solution 1 (recommended): just remove the JRE system library in the project build path, and then add the JRE system library. After recompiling, everything will be normal.

Solution 2: windows – > Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning