JavaFX issue (Eclipse)

+5 Wilford Ice Brimley · January 11, 2015
So I am reading a book called, "Introduction to Java programming comprehensive version 10th edition" by y. Daniel Liang (good book btw!) and ran into an issue when reading the chapter that introduces javafx. Liang starts off by importing the javafx.application.Application, so I do this and I get an error "Access restriction: The type 'Application' is not API (restriction on required library 'C:\Program Files\Java\jre1.8.0_20\lib\ext\jfxrt.jar')". I'm not sure what this error means. Any help that would allow me to import Application would be great!

Thanks!

Post a Reply

Replies

Oldest  Newest  Rating
+1 Stefan Baiu · April 29, 2015
Had the same problem. Here's how I solved it: 
Go to Package Explorer.  Right click on JRE System Library and go to Properties. In the Classpath Container > Select JRE for the project build path select the third option (Workspace default JRE).

(note: I'm using Eclipse Luna)
0 Damn It · May 6, 2015
Do you have a step by step tutorial on installing using Ubuntu terminal ? 
0 Saksham Goyal · November 29, 2016
stefan baiu you fixed this problem!!!! THANKS!!!!


Had the same problem. Here's how I solved it: 
Go to Package Explorer.  Right click on JRE System Library and go to Properties. In the Classpath Container > Select JRE for the project build path select the third option (Workspace default JRE).

0 Kuroodo Ditory · January 16, 2015
Though I don't think this will fix your problem... try pressing ctrl+shift+O . This will auto-import stuff that is needed. It might just import the proper JavaFX package needed.
0 Akshay Anand · December 22, 2016
i get an error of "Prints the ASM code to generate the given class.
Usage: ASMifierClassVisitor [-debug] <fully qualified class name or class file name>"

while running buckys code.. in this 2nd tutorial for hello youtube.. not able to fix this in eclipse. please help!
  • 1

Java / Android Development

128,053 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator