简体   繁体   English

导入软件包,但出现访问限制类型错误

[英]import the package but got Access restriction type error

I have imported import javafx.application.Application; 我已经导入import javafx.application.Application; and import javafx.scene.Scene; import javafx.scene.Scene;

I get error message like 我收到类似的错误消息

Access restriction: The type 'ScrollPane' is not API (restriction on required library C:\\Program Files\\Java\\jre1.8.0_144\\lib\\ext\\jfxrt.jar ) 访问限制:类型'ScrollPane'不是API(对所需库C:\\Program Files\\Java\\jre1.8.0_144\\lib\\ext\\jfxrt.jar

How can I resolve it? 我该如何解决?

Had same kind of access restriction issue with smartcardio libraries. smartcardio库具有相同的访问限制问题。 Done these steps and resolved. 完成这些步骤并解决。 Hope same will be applicable here also. 希望同样适用于这里。

Right click project -> Build Path -> Configure Build Path 右键单击项目->构建路径->配置构建路径
Libraries Tab -> Remove JRE -> Add Library -> Select JRE System Library -> Next -> Finish 库选项卡->删除JRE->添加库->选择JRE系统库->下一步->完成

Hope this will help. 希望这会有所帮助。 :-) :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM