Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

JavaFX is not recognized in Eclipse

JavaFX is supposed to be included with the latest release of the JDK. I'm using 1.7 v 17. Imports like:

import javafx.fxml.Initializable;

are not recognized. I would prefer not to have to link to the jar manually.

I heard that this was a bug before, but that it should have been fixed. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166330

Does anyone have an answer on how javafx can be recognized. I don't want to have e(fx)clipe do it for me and I don't want to have to link the jar. As far as I understand, it;s now included in the latest release of the jdk, therefor I should be able to do an import like above right?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

JavaFX isn't on any of the default classpaths in JDK7 - please see in which version the bug has been fixed!

In JDK8 this is fixed and JavaFX is on the ExtensionClasspath but still you'll get warnings from Eclipse because stuff on the extension classpath is considered an implementation detail - you'll can fix this yourself in the JRE-Runtimes.

What's your problem with e(fx)clipse? It would fix all your problems no matter if you develop against JDK7 or JDK8?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...