关于Access restriction: The type 'Application' is not API (restriction on required library)(示例

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于Access restriction: The type 'Application' is not API (restriction on required library)(示例相关的知识,希望对你有一定的参考价值。

原文链接:http://rxxluowei.iteye.com/blog/671893

今天写第一次写JavaFX的入门程序就GG

遇到了导入API的问题,无奈疯狂地通过网络找解决方案..

我的问题是: 导入import javafx.application.Application;时 出现这个错误提示

 

Access restriction: The type ‘Application‘ is not API (restriction on required library ‘C:\Program Files\Java\jre1.8.0_111\lib\ext\jfxrt.jar‘)

解决方法: 
Project -> Properties -> libraries, 
先remove掉JRE System Library,然后再Add Library重新加入。 



以上是关于关于Access restriction: The type 'Application' is not API (restriction on required library)(示例的主要内容,如果未能解决你的问题,请参考以下文章

Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access

Access restriction: The type QName is not accessible due to restriction on required library

Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on require

Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required libra

Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:Pr(

Access restriction: The type 'JPEGCodec' is not API