简体   繁体   中英

import the package but got Access restriction type error

I have imported import javafx.application.Application; and 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 )

How can I resolve it?

Had same kind of access restriction issue with smartcardio libraries. 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

Hope this will help. :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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