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'
  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'

相关文章:

  • 2021-10-09
  • 2021-09-24
  • 2021-08-11
  • 2021-06-24
  • 2021-10-16
  • 2021-06-03
  • 2022-03-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-23
  • 2022-01-31
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
相关资源
相似解决方案