MyEclipse/Eclipse Import sun.misc.BASE64Encoder jar package steps
1. Right-click the project –>Properties –>JavaBulidPath-> Libraries –>JRESystem Library –>Access rules –>Double-click Type Access Rules in Accessible add accessible, fill in the following ** click OK.
2. When writing Java code in MyEclipse, use BASE64Decoder, import sun.misc.
sun.misc.BASE64Encoder and sun.misc.BASE64Encoder can’t find the solution
1. right click the project – “properties – “java bulid path – “jre System Library – “access rules – “resolution select accessible. fill in the following ** click OK on it.!
2.When writing Java code in MyEclipse, BASE64Decoder is used, import sun.misc.BASE64Decoder; but Eclipse prompts.
Access restriction: The type BASE64Decoder is not accessible due to restriction on required library C:\Program
files\java\jre6\lib\rt.jar
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar
Solution 1 (recommended).
Simply remove the JRE System Library from the project build path, then add the library JRE System Library, and compile again and everything will be fine.
Solution 2.
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning
Similar Posts:
- [Solved] Eclipse Error: Access restriction: The type ‘BASE64Decoder’ is not API
- The solution of base64decoder prompt error under eclipse
- Sun.misc.base64decoder import exception and handling ideas
- IDEA sun.misc.BASE64Encoder
- [Solved] Access restriction: The type ‘JPEGCodec’ is not API (restriction on required library …
- IDEA compile error: sun.misc.Base64decoder upgrade processing
- JAVA8 Access restriction: The type ‘Application’ is not API (restriction on required lib
- Solve the error reported by eclipse project: unbound classpath container
- How to Solve Eclipse Access restriction (javax.xml.namesp)
- Error reporting when importing Maven project from MyEclipse