`

【实际问题】关于“The type ** is not accessible due to restriction on required library”

 
阅读更多

     按照上一篇《javax.servlet不存在的问题的说明添加javax.servlet后,在eclipse里出现“The type **** is not accessible due to restriction on required library”的错误,大概的意思就是要导入的包被限制了。

 

 

 

解决方法:

 

  选中项目--右键--进入Properties(属性)视图

 

  选中Java Build Path--点击Libraries--展开JRE System Library[JavaSE-1.6],选中Access rules这一项(如果没有,那就是JDK安装和配置的问题)。

 

   Edit--点击Add--在Rule Pattern(规则式样)编辑你允许导入的类库,如本例中输入(javax/servlet/**),允许就是在Resolution选项中选中Accessible(当然,有些项目需要可以选择Forbidden、Discourage某些类库)。

 

   然后重启就可以了。

分享到:
评论

相关推荐

    sun.misc.base64decoder.jar下载

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

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

    The Princeton Companion To Mathematics

    notion which is not a constituent of the propositions which it considers, namely the notion of truth. The Princeton Companion to Mathematics could be said to be about everything that Russell’s ...

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

    王小平版遗传算法的光盘源代码

    is compiled into an object library file, which is then linked with the problem specific objects. Read the notes in the Makefiles in all the sub-directories, make any necessary changes to fit your ...

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

    微软内部资料-SQL性能优化2

    The main advantage of running in-process is that the system usually does not need to perform a context switch. The disadvantage to running in-process is that DLL has access to the process address ...

    Electronics A Systems Approach 6th Edition by Neil Storey- 2017

    One of the barriers to the use of simulation in the study of electronics is the time taken to prepare the circuit files required by the simulator. Even though packages such as PSpice permit circuits ...

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

    The EssentialGuide to Image Processing

    The reader will find that this Guide covers introductory, intermediate and advanced topics of digital image processing, and is intended to be highly accessible for those entering the field or wishing ...

    Introduction.To.Algorithms,.Second.Edition

    questions that lead the student through the steps required to arrive at a solution. We have starred (⋆) the sections and exercises that are more suitable for graduate students than for undergraduates...

    iOS-2048-master

    Not surprisingly, this is pretty hard with the 3x3 board, although I found it pretty easy to get 81. 243 is a different story... And the Fibonacci sequence, i.e. combining two adjacent numbers in the...

    The Go Programming Language(Addison,2015)

    The chapters on methods and interfaces introduce Go's unconventional approach to object-oriented programming, in which methods can be declared on any type and interfaces are implicitly satisfied....

    Dick A Guide to the Penis for Men and Women eBook pdf

    Dick A Guide to the Penis for Men and Women ... The book presents the facts in a manner easily accessible and relevant to all ages, and answers questions men and women are often too embarrassed to ask.

    The.Go.Programming.Language.0134190440.epub

    The Go Programming Language is the authoritative resource for any programmer who wants to learn Go. It shows how to write clear and idiomatic Go to solve real-world problems. The book does not assume ...

Global site tag (gtag.js) - Google Analytics