`
xiaoboss
  • 浏览: 642232 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Class is not accessible due to restriction on required library

    博客分类:
  • java
 
阅读更多

How to solve

This error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.

  • Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
  • (Project) Properties -> Java Compiler -> Errors/Warnings

Locate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error messages.

"Warning" or "Ignore" options will only hide the potential issue in the project, by allowing the project to use any classes ignoring predefined access rules. To completely resolve this issue, analyze the project and located the use of restricted classes and take necessary actions (either remove those references or access rules).

 

只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。

分享到:
评论

相关推荐

    sun.misc.base64decoder.jar下载

    sun.misc.BASE64Encoder找不到jar包的解决方法?... Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\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。只要...

    java识别验证码.docx

    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。只要把...

    解决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.jar 解决方法就在这里

    C++ Standard Library Quick Reference

    The book does not explain the C++ language or syntax, but is accessible to anyone with basic C++ knowledge. Even the most experienced C++ programmer though will learn a thing or two from it and find ...

    Apress.Cplusplus17.Standard.Library.Quick.Reference.1484249224.pdf

    It does not explain the C++ language or syntax, but is accessible to anyone with basic C++ knowledge or programming experience. Even the most experienced C++ programmer will learn a thing or two from...

    C17 Standard Library Quick Reference, 2nd Edition.zip

    It does not explain the C++ language or syntax, but is accessible to anyone with basic C++ knowledge or programming experience. Even the most experienced C++ programmer will learn a thing or two from...

    C++ Standard Library Quick Reference(Apress,2016)

    The book does not explain the C++ language or syntax, but is accessible to anyone with basic C++ knowledge. Even the most experienced C++ programmer though will learn a thing or two from it and find ...

    Introduction.To.Algorithms,.Second.Edition

    Preface This book provides a comprehensive introduction to the modern study of computer algorithms. It presents many algorithms and ...not be included due to lack of space. Despite myriad requests from

    Introduction to Space-Time wireless Communications

    This book is an accessible introduction to the theory of space-time wireless communications. The authors discuss the basics of space-time propagation, space-time channels, channel capacity, spatial ...

    C++ How to Program, 10th Edition

    The best-selling C++ How to Program is accessible to readers with little or no programming experience, yet comprehensive enough for the professional programmer. The Deitels’ signature live-code ...

    Linux device driver 3nd(EN)

    the flow of new hardware products is not likely to slow down anytime soon, and somebody is going to have to make all those new gadgets work with Linux. But this book is also about how the Linux ...

    Coding.in.Style.B01C85DTJS

    It is an art that is accessible to all of us. The aim of this book is not to teach you how to write beautiful code. The aim is to convince you that there is more to coding than making it work. The ...

    linux设备驱动开发(english)

    the flow of new hardware products is not likely to slow down anytime soon, and somebody is going to have to make all those new gadgets work with Linux. But this book is also about how the Linux ...

    Big Data SMACK_ A Guide to Apache Spark, Mesos, Akka, Cassandra, and Kafka.pdf

    And this is due to the popular belief that not all of us have access to large volumes of corporate data or large enterprise production environments. Apache Spark is disrupting the data industry for ...

    Deep Learning, Vol. 2: From Basics to Practice

    Our focus is on the principles and techniques that are applicable to any language, library, and hardware. Even so, practical programming is important. To stay focused, we gather our programming ...

    Machine Learning - Hands-On for Developers and Technical Professionals

    For the tech professional involved in data science,Machine Learning: Hands-On for Developers and Technical Professionals provides the skills and techniques required to dig deeper.

    iOS-2048-master

    * The `M2GlobalState` class is a global class accessible from anywhere in the universe. Well, global stuff is evil, right? At least so we are told. But, it is at least better to encapsulate the global...

    The Princeton Companion To Mathematics

    of it, it is useful to know not just which arrangements of symbols form grammatically correct mathematical statements, but also which of these statements deserve our attention. Of course, one cannot ...

Global site tag (gtag.js) - Google Analytics