Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download and install JavaFX for Eclipse

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?

like image 490
TacB0sS Avatar asked Feb 01 '13 12:02

TacB0sS


People also ask

Can I run JavaFX in Eclipse?

Now, we need to configure Eclipse to execute the JavaFX applications. There are two ways of Eclipse Configuration for this purpose. We can either export the JavaFX jar files to every Java project or install a new software which can support the JavaFX project creation directly.

How do I download JavaFX package?

Go to the JavaFX Downloads page. Find the JavaFX SDK downloads, click the link for your operating system, and follow the prompts to save the executable file. Run the .exe file and complete the steps in the installation wizard. The default installation directory for the SDK is C:\Program Files\Oracle\JavaFX 2.0 SDK.

How do I add JavaFX to my project?

Go to File -> Project Structure -> Libraries and add the JavaFX 18 SDK as a library to the project. Point to the lib folder of the JavaFX SDK. Once the library is applied, the JavaFX classes will be recognized by the IDE.


1 Answers

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.

like image 198
chandan sr Avatar answered Oct 29 '22 08:10

chandan sr