import the package but got Access restriction type error

4k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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