I have looked through similiar posts about this but none of the already posted solutions have worked for me. Therefore I will try to explain my particular situation and hope that someone knows what I have done wrong.
I am working with IntelliJ and SceneBuilder to build a recipebook for a school project, however, it does not seem to work to compile the project at the moment.
The error message I have been given is:
Error. JavaFX runtime components are missing, and required to run this application
Process finished with exit code 1
What I have done:
I have to my knowledge done everything right by adding all libraries in Project Structure such as javafx 17 library, and also the backend for this particular project. I have also configured my VM-options accordingly:
--module-path \Users\Admin\Skola2\javafx-sdk-17.0.6\lib\ --add-modules=javafx.controls,javafx.fxml
I have also checked whether the JavaFX plugin is active which it is. To my knowledge this should be everything you need to configure in order to know whether the program could compile or not.
My main class:
package recipesearch;
import java.util.ResourceBundle;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
public class RecipeSearch extends Application {
@Override
public void start(Stage stage) throws Exception {
ResourceBundle bundle = java.util.ResourceBundle.getBundle("recipesearch/resources/RecipeSearch");
Parent root = FXMLLoader.load(getClass().getResource("recipe_search.fxml"), bundle);
Scene scene = new Scene(root, 800, 500);
stage.setTitle(bundle.getString("application.name"));
stage.setScene(scene);
stage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
If anyone has any idea on what to do, please help! Thank you.