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
Similar Posts:
- Steps of MyEclipse / eclipse importing sun.misc.base64encoder jar package
- The solution of base64decoder prompt error under eclipse
- JAVA8 Access restriction: The type ‘Application’ is not API (restriction on required lib
- Sun.misc.base64decoder import exception and handling ideas
- [Solved] Access restriction: The type ‘JPEGCodec’ is not API (restriction on required library …
- How to Solve Eclipse Access restriction (javax.xml.namesp)
- [Solved] Eclipse project red exclamation mark: build path problem
- How to handle the eclipse error message the declared package does not match the expected package
- IDEA compile error: sun.misc.Base64decoder upgrade processing
- The solution of the import javax.servlet cannot be resolved in Java