0

Is there any equivalent of this JavaFX Preloader and Netbeans, for the IntelliJ editor either online that I'm not finding or in someones noggin?

I've followed these posts How to create splash screen as a Preloader in JavaFX standalone application?, Java 9 JavaFX Preloader but I'm still a little lost and unsure - I end up with 3 main functions (1 for Main containing code below, 1 for TestPreLoader extending PreLoader and 1 for MyApplication extending Application) and Application.launch in

public class Main {
   public static void main(String[] args) {
       System.setProperty("javafx.preloader", "TestPreLoader");
       Application.launch("MyApplication", args);
   }
}

will not accept args as a parameter even though the types are identical.

Also, I've tried this from jetbrains but it doens't tell me anything about preloaders or how to link it with the application or why it's important. https://www.jetbrains.com/idea/help/applications-with-a-preloader-project-organization-and-packaging.html

Anyone have any ideas? Thanks

1 Answer 1

1

So I figured it out, it was a little silly. Turns out I just needed to do this.

public class Main {
    public static void main(String[] args) {
        System.setProperty("javafx.preloader", TestPreLoader.class.getCanonicalName());
        Application.launch(MyApplication.class, args);
    }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.