【Java】import sun.misc.BASE64Decoder 报错解决

上一篇 / 下一篇  2015-11-16 11:19:53 / 个人分类:开发

记录一下报错怎么解决的……第三方jar的引用。

Access restriction: The type 'BASE64Encoder' is not API (restriction on required library 'D:\Java\jdk1.6.0_43\jre\lib\rt.jar')

eclipse引入import sun.misc.BASE64Encoder; 是红叉,怎么解决?

Access restriction: The type 'BASE64Encoder'

工具/原料

  • eclipse

方法/步骤

  1. 右键项目,点属性(Properties);

    Access restriction: The type 'BASE64Encoder'
  2. java bulid path-->Libraries-->jre System Library;

    Access restriction: The type 'BASE64Encoder'
  3. Access Rules-->Edit;

    Access restriction: The type 'BASE64Encoder'
  4. Add,resolution选择accessible,下面填上** 点击确定即可!

    Access restriction: The type 'BASE64Encoder'
  5. 5

    这时项目就不再报错了;

    Access restriction: The type 'BASE64Encoder'


TAG: import Import java Java

 

评分:0

我来说两句

Open Toolbar