`
paddy.w
  • 浏览: 503468 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

eclipse中Access restriction问题的解决

 
阅读更多
如果在Eclipse使用某些访问受限的API时,会报这种错误:
Access restriction: The type Resource is not accessible due to restriction on required library
这是因为Eclipse默认把这些受访问限制的API设成了ERROR,在java-compiler-Errors/Warnings选项里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过,只是报警告而不是报错,保证了编译能通过。
分享到:
评论

相关推荐

    Eclipse错误解决办法

    本文将详细介绍如何解决Eclipse中与Maven配置相关的问题,以及一些其他常见的Eclipse使用技巧。 1. **解决Eclipse找不到Maven包的问题** 当Eclipse报错`org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER`,表明...

    解决eclipse导入rt包问题

    然而,在使用Eclipse开发环境中导入这两个类时,可能会遇到访问限制错误:“Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt...

    base64转换遇到问题解决方法

    1. Access restriction:在Eclipse中编写Java代码时,使用了BASE64Decoder,但Eclipse提示:Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program ...

    Eclipse访问策略设置

    在提供的文档"Eclipse Access restriction.docx"中,很可能详细介绍了如何执行这些步骤,并提供了实际的示例和最佳实践。这将帮助开发者理解如何在实际项目中应用访问策略,以保护系统安全性和合规性。 总的来说,...

    sun.misc.base64decoder.jar下载

    sun.misc.BASE64Encoder找不到jar包的解决方法? 在MyEclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示:  Access restriction: The type BASE64Decoder is not ...

    Eclipse中设置jar的访问受限设置

    在使用Eclipse进行Java开发的过程中,有时会遇到“Access restriction”错误,这类错误通常发生在尝试访问某个类或者包时,Eclipse认为该类或者包的访问级别受到了限制。例如,当尝试导入一个项目时,可能会出现以下...

    Eclipse中引入com.sun.image.codec.jpeg包报错的完美解决办法

    但是,有时引入这两个包时会报出错误:`Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:/Java/jre1.6.0_07/lib/rt.jar`。 解决方法一:修改全局属性 ...

    import com.sun.image.codec.jpeg.JPEGImageEncoder;包的下载

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 此时解决办法: Eclipse默认把这些受访问限制的API设成了ERROR。只要...

    eclispe错误

    在错误信息中,我们看到 "Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar",这表明你尝试访问的 `JPEGCodec` 类受到了...

    java识别验证码.docx

    可以通过调整Eclipse的设置来解决这个问题: - 打开Eclipse,选择“Windows” > “Preferences” > “Java” > “Compiler” > “Errors/Warnings”。 - 在“Deprecated and restricted API”类别中,找到...

    Heritrix的安装与配置

    例如,`Access restriction`错误是由于JRE的访问限制导致的。解决这个问题的方法是在项目构建路径中删除有问题的JRE库,然后重新导入。另一种方法是将错误级别设置为警告或忽略。 另一个可能遇到的错误是`...

Global site tag (gtag.js) - Google Analytics