Steps of MyEclipse / eclipse importing sun.misc.base64encoder jar package

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: