Draft JEP for new Packaging Tool (replacement for javapackager)
mario at datenwort.at
Mon Jun 4 16:43:06 UTC 2018
I’ve just test with this very small JavaFX Application:
public class TstFx extends Application
public void start(Stage primaryStage) throws Exception
Label root = new Label("test");
Scene scene = new Scene(root, 800, 600);
primaryStage.setOnShown(evt -> System.exit(1));
public static void main(String args)
As you can see, the program forcibly exits once the stage is shown. So, using „time“ I can simply measure the time required until the stage should be visible on screen.
Starting this with an incredible huge classpath (the one we have to use in production) I get this times:
Using a really small classpath I can come down to:
MacBook late 2016.
The „user" difference seems to be just because of the classpath scanning. No static initialization happening, because this TstFx does not reference any other class.
Am 04.06.2018 um 18:22 schrieb Scott Palmer <swpalmer at gmail.com<mailto:swpalmer at gmail.com>>:
Nobody is arguing against splash screens. I’m simply suggesting that the JVM startup is not slow enough that we need special handling of this in native code.
If Java can get a window displayed in under half a second there is no need for the added complexity to support a native splash screen in the launcher.
The idea that cinit code *can* be slow is not really the issue here unless it isn’t possible to get a window displayed quickly even when there is no significant initialization other than to get that window= shown. Don’t put heavy initialization in the main class when you want a splash screen. Use a pre-main class that shows the splash screen and calls the “real” main class.
It makes sense to understand if we have this problem before making a complex solution.
On Jun 4, 2018, at 10:44 AM, Pedro Duque Vieira <pedro.duquevieira at gmail.com<mailto:pedro.duquevieira at gmail.com>> wrote:
I agree with Johan and others, a splash screen is valuable and needed.
Microsoft applications that run on Windows itself (think Word, Excel, etc),
they have a splash screen, Intelllij has a splash screen (it's swing based
AFAIK), etc.. If a Microsoft application running on its own operating
system needs a splash screen then chances are pretty high that there will
be Java apps that'll need a splash screen.
Pedro Duque Vieira
More information about the openjfx-dev