Ask Your Question

There is no javaFX packages in openjdk-1.8.0 ! (Fedora Gnu/Linux)

asked 2016-08-31 00:53:06 -0600

AliZeynali gravatar image

updated 2016-08-31 01:02:40 -0600

First of all I'm not sure this is a right place for asking this question, Sorry if it is not

I'm Using Fedora 24 and I installed openjdk-1.8.0 , When i type javac -version The result is : javac 1.8.0_102
I just started to learn javaFX! so I wrote a simple small test code and compile it :

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
public class MyJavaFX extends Application {
public void start(Stage primaryStage) {
Button btOK = new Button("OK");
Scene scene = new Scene(btOK, 200, 250);
public static void main(String[] args) {

And There is the result: error: package javafx.application does not exist I checked /usr/lib/jvm-exports/ There was no jfxrt.jar so i made a Copy on this Directory but nothings changed! In addition I have no problem with java Swing

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2016-08-31 01:35:45 -0600

fcomida gravatar image

No javafx in fedora, there are a couple of build attempts on copr, you might want to contact their author. If you really need javafx the only option right now is installing oracle java.

edit flag offensive delete link more


thanks I installed Oracle Java and its path is /usr/java/jdk1.7.0_79 but javac is still using the openjdk how can i change it? @fcomida

AliZeynali gravatar imageAliZeynali ( 2016-08-31 04:22:46 -0600 )edit

latest oracle java (1.8 i guess) is integrated in the alteratives framework so the following steps shouldn't be necessary. In any case:

alternatives --config java alternatives --config javac alternatives --config javaws

To verify:

alternatives --list | grep /usr/java

fcomida gravatar imagefcomida ( 2016-08-31 05:54:52 -0600 )edit

i installed oracle java 1.8.0_101 and every things is good :D tnx

AliZeynali gravatar imageAliZeynali ( 2016-09-02 11:35:20 -0600 )edit

Oh just in case for people who have this problem and they already have openjdk for javac i found openjfx rpm in maybe this solve the problem i didn't test it myself but it can work

AliZeynali gravatar imageAliZeynali ( 2016-09-02 11:38:36 -0600 )edit

answered 2017-08-22 17:46:36 -0600

andrej gravatar image
dnf install java-1.8.0-openjdk-openjfx
edit flag offensive delete link more



worked for me, thanks

gshereme gravatar imagegshereme ( 2018-03-02 13:15:11 -0600 )edit

Great. Worked for me as well.

bioshark gravatar imagebioshark ( 2018-11-12 15:16:34 -0600 )edit

Question Tools


Asked: 2016-08-31 00:53:06 -0600

Seen: 8,229 times

Last updated: Aug 31 '16