Ask Your Question
0

package javafx.scene.control not found in Fedora 29

asked 2018-11-05 12:19:55 -0600

medeoTL gravatar image

I'm trying to build this code

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class ButtonExperiment extends Application  {

    @Override
    public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("HBox Experiment 1");

        Button button = new Button("My Button");

        Scene scene = new Scene(button, 200, 100);
        primaryStage.setScene(scene);
        primaryStage.show();

    }

    public static void main(String[] args) {
        Application.launch(args);
    }
}

but I get this error:

package javafx.scene.control does not exist

I'm using openjava 8

[medeo@medeo-E540 ~]$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b15)
OpenJDK 64-Bit Server VM (build 25.181-b15, mixed mode)

and I think I've installed all the necessari open JavaFX (aka openjfx):

dnf list java*
Last metadata expiration check: 1 day, 8:31:13 ago on Sun 04 Nov 2018 10:38:02 CET.
Installed Packages
java-1.8.0-openjdk.x86_64                                   1:1.8.0.181.b15-6.fc29     @updates
java-1.8.0-openjdk-devel.x86_64                             1:1.8.0.181.b15-6.fc29     @updates
java-1.8.0-openjdk-headless.x86_64                          1:1.8.0.181.b15-6.fc29     @updates
java-1.8.0-openjdk-openjfx.x86_64                           1:1.8.0.181.b15-6.fc29     @updates
java-1.8.0-openjdk-openjfx-devel.x86_64                     1:1.8.0.181.b15-6.fc29     @updates
java-9-openjdk-headless.x86_64                              1:9.0.4.11-6.fc28          @fedora 
java-gnome.x86_64                                           4.1.3-18.fc29              @fedora 
javapackages-filesystem.noarch                              5.3.0-1.fc29               @fedora 
javapackages-tools.noarch                                   5.3.0-1.fc29               @fedora 
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-11-17 14:23:05 -0600

bluexin gravatar image

A bug report is filed under https://bugzilla.redhat.com/show_bug....

edit flag offensive delete link more
0

answered 2018-12-04 02:40:25 -0600

medeoTL gravatar image

With recent updates of openjfx (8.0.152 19.b05.fc29) code compile correctly, thanks

edit flag offensive delete link more

Question Tools

Stats

Asked: 2018-11-05 12:19:55 -0600

Seen: 358 times

Last updated: Nov 05 '18