fxlauncher icon indicating copy to clipboard operation
fxlauncher copied to clipboard

fxlauncher and preloader ?

Open ouaibsky opened this issue 7 years ago • 4 comments

Hi

This is more a question rather than a bug I'm testing fxlauncher with my application (desktop) that is using a preloader class to use a custom splashscreen.

main is like this:

 public static void main(String[] anArgs) {
        LauncherImpl.launchApplication(MainApp.class, MyPreloader.class, args);
}

Everything is working fine except the preloader class is never called.

Is it going as expected for fxlauncher point of view ?

Regards Christophe

ouaibsky avatar Mar 24 '17 10:03 ouaibsky

We dont support the preloader class, but we could add that in the manifest. I'll play a bit with it

ronsmits avatar Mar 24 '17 11:03 ronsmits

@ouaibsky what exactly do you mean when you see preloader? fxlauncher already has the option to override the loader screen using UIProvider (See https://github.com/edvin/fxlauncher-custom-ui for more information).

If you use fxlauncher to launch your application we cannot call the preloader anymore the way you do in this ticket.

ronsmits avatar Mar 27 '17 16:03 ronsmits

At this line https://github.com/edvin/fxlauncher/blob/3024b413c8743d1e3576e91f9911b68076bcb625/src/main/java/fxlauncher/Launcher.java#L171 could we call launch() instead of init()?

I have a suspicion that doing that in combination with setting the preloader as a system property might allow the preloader to display itself. The motivation to use a Preloader (instead of just FXLauncher's UIProvider) is how a Preloader is connected to the app's launching process.

Here's an excellent explanation of the whole launching process: https://blog.codecentric.de/en/2015/09/javafx-how-to-easily-implement-application-preloader-2/ Launch Timeline

TurekBot avatar Apr 25 '19 03:04 TurekBot

Hi, I'm trying to use fxlauncher for an existing app which uses preloader. As mentioned by @ouaibsky even I'm not getting the preloader screen. Just wanted to check if it's going to be supported in a future version. Thanks!

jkash20 avatar Aug 20 '20 12:08 jkash20