Marcus Ataide
Marcus Ataide

Reputation: 7530

JavaFX only run with JDK

My JavaFX Desktop program only run with JDK 1.8 installed, doesnt run with JRE 1.8.

Any JavaFX Application should run with JRE? If NO, How can I find why JDK is needed?

Upvotes: 0

Views: 1480

Answers (2)

Woodchuck
Woodchuck

Reputation: 4414

Per Oracle's documentation, the JavaFX SDK and Runtime (jfxrt.jar) are included in the Java JDK, beginning with Java SE 7 Update 2. As long as the application was compiled with this version or later, it should run JavaFX.

Also per their site, the JavaFX APIs are fully integrated with the Java SE Runtime Environment (JRE) and the Java Development Kit (JDK).

The specific location where you should find jfxrt.jar in both the JDK and JRE is:

Additional info can be found at Oracle's various JavaFX resources such as here and here - though the latter was created for JavaFX 2, so may not be entirely compatible with the latest version of JavaFX.

Upvotes: 0

Jai
Jai

Reputation: 8363

This is because JavaFX runtime is not packaged into some distributions of JRE. As far as I know JavaFX will be in all distributions only when JDK 9 is released. Till then, it is safer to install JDK instead of JRE, or you can include jfxrt.jar when you export your project into JAR file.

Upvotes: 1

Related Questions