I installed jdk 7u9 and added it to the build path of an eclipse Java project.
However, when I'm trying to import some javafx classes eclipse can't recognize them:
import javafx.scene.media.Media;
I read at Oracle's website (and a lot of other websites) that javafx is already included in jdk 7u9 and there is no need to install any additional addons.
What could be the problem?
The jfxrt.jar is in the jre/lib folder of your jdk, but not on the default boot classpath. That is why Eclipse won't add it to the "JRE System libraries".
The issue is tracked here.
The fix will be made in Java 8.
You should add the jar manually to the project build path or use e(fx)clipse and setup a JavaFX Project.
Related
I'm trying to install the plugin e(fx)clipse on linux to work with graphic interface on my project, but after downloading and completing the installation, my application could not import classes coming from javafx.
I managed to fix by installing OpenJDK, the jfxrt.jar file was missing. After installation, the file in question was downloaded at /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar.
I added it in the bulid path of the project and I was able to import the javafx classes, but now when I try to run the application the following error appears:
"Error: JavaFX runtime components could not be found.
I already reinstalled the e (fx) clipse and it did not change anything. Can someone help me? I hava jdk-11 installed and updated.
If you download and install Java from here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html it will just work. e(fx)clipse has nothing to do with that. You don't need it to run a JavaFX application.
My Eclipse Mars 4.5.1. uses JDK 8 to start-up (specified in the eclipse.ini)
My RCP project uses JDK 7. The entire workspace uses 7. I've also included the JavaFX JAR until I migrate the whole project to JDK 8, where I won't need it.
When I try to export the RCP project using the .product file, the exported version has some logs saying that certain classes using JavaFX have compile errors. Even though the exported version is started with JDK 7 (specified in the .ini file), and the JavaFX JAR surely was exported too, these UI components crash.
This whole process works with Eclipse starting with JDK 7 !
I really want to use my Eclipse with JDK 8, but ONLY the Eclipse
How does Eclipse influence the export process? My target platform points to eclipse, but has JDK 7 set on it.
You can try to put a JRE 7 in your product location and test if it runs, remove the entry in the .ini file.
plugins
configurations
jre
...
If this works, your entry in the .ini file is probably wrong.
Another thought: "I've also included the JavaFX JAR", where did you include it? Maybe you need to include it in the JRE.
I am following JavaFX tutorial found at
http://code.makery.ch/java/javafx-8-tutorial-part7/
which describes how to create native installer with 'Inno Setup'.
I am using e(fx)clipse 4.4 with java 8 JRE installed only and 1.8 compiler
and i do it for windows (exe).
Everything works fine, but when i install exported native application it create folders for JRE
runtime/jre8/
program wont start and says
jvm.dll is not found in bundled runtime.
if i change manualy runtime/jre8/ to runtime/jre/ - it start without any problem.
I did not found any settings in project for specifing runtime path.
How do i make my native installer make right path for runtime?
Solved. Just noticed that i was using standalone jre for project c:\dev\java\jre8 but supposed to use jre from jdk package c:\dev\java\jdk1.8.0_05\jre.
Now installer creates proper path for runtime - runtime/jre/
I just updated my JDK to the JDK 1.8 because i couldnt find the jfxrt.jar needed by java FX in the 1.7 version.
I downloaded the JDK from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Specifically the version:
jdk-8u5-linux-i586.rpm
I use opensuse 13.1 by the way.
Now after the installation my usr/java/jdk1.9_05/lib still does not contain the jfxrt.jar.
Has anybody an idea why, I read that this version should actually contain it. Can I fix this problem putting the jar in ther manually?
For me on OSX it's under jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/jfxrt.jar. I'd guess it's in an analogous place on your machine. Try /usr/java/jdk1.8.0_05/jre/lib/ext/jfxrt.jar
Am using linuxmint 18.1 and i had the same issue. i realized that the open jdk i had didn't have the jfxrt.jar library.
Download another jdk from oracle and then install it. Remember to change the path in the netbeans.conf file in the netbeans installation folder.
From the above comments, i tried this.
I added jfxrt.jar(Downloaded JDK) to PC.
In eclipse, right click project --> properties --> Libraries --> Add external jar and choose the jar file.
The error went away.
You have to add requires jfxrt; to your module-info if you have trouble after adding jfxrt.jar
I'm an experienced (Java, Eclipse & Maven) developer, and have used a couple of frameworks thus far. Every time I'm trying to start with something new, it seems like there are about a zillion configuration possible for downloading and installing it.
I've looked here for instructions, and all the near pages, but they seem out dated, the Eclipse plugin path is invalid, and when I install the latest version I've found no the site (2.0.2), it says that I have a newer version installed.
Also, the Maven setup in most posts I've read seems obscure.
I'm using:
Windows 7
Eclipse x64 Indigo
JDK x64 1.6.0.24
Maven 3.0.3
And I don't recall installing the JavaFX.
What an I missing? Where can I read about the setup in order to start working with this framework?
JavaFX gets installed if you install the latest JDK 7 from Oracle (co-bundled).
You can find the Eclipse plugin here:
http://efxclipse.org/
If your're interested in Maven builds: I've recently released an initial version of Drombler FX, a modular RCP for JavaFX based on OSGi and Maven (POM-first):
http://puces-blog.blogspot.ch/2012/12/drombler-fx-building-modular-javafx.html
http://wiki.drombler.org/GettingStarted
I did tried efxclipse but it was not enough for me. I have also tried to give the path of javafx jar file to efxclipse
Window->Prefrences->javafx->"The path to javafx jar which is
jfxrt.jar"
. But nothing worked for me I don't know what was going wrong.
Then I just add the jfxrt.jar file to my Library and everything worked fine :-
1. Right click your JRE System Library
2. Build Path
3. Configure Build Path
4. Add External Jars
5. "The path to jfxrt.jar"
You can download jfxrt.jar file from this link.
Or
If you have already downloaded the latest oracle JAVA JDK you will find in this path
Extracted_oracle_jdk_folder/jre/lib/ext/jfxrt.jar
That's it everything should work fine.
Try e(fx)clipse at http://efxclipse.org/. I'm a netbeans developer, but heard a lot of good stuff about that plugin from my eclipse using friends.