0

I have a problem importing an existing project.

    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;

The error: The import javafx cannot be resolved.

I use Java 8 OpenJDK amd64 as the JRE System Library. Also i have no idea which version of java the primary version had if you would refer to this solution. I use the newest version i can.
Any ideas?
Thanks

1 Answer 1

3

The OpenJDK does not contain JavaFX. You need to install it separetely, if you want to stick with it. Please check out the OpenJFX project, that provides the open source version.

Or you might consider using Oracle's JDK, that contains it out of the box.

Sign up to request clarification or add additional context in comments.

2 Comments

So which JRE would you recomment in this case?
You choice the JRE that fits your needs the best. So, if you want to have "less" efforts in using javafx, you might prefer an Oracle one over OpenJDK. If you prefer OpenJDK, you will have to install the required libraries yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.