Reputation: 2931
I need to implement a SplashScreen in java, and i'm currently learning from How to Create a Splash Screen but there is paragraph that says
Fortunately, Java™ SE 6 provides a solution that allows the application to display the splash screen much earlier, even before the virtual machine starts. A Java application launcher is able to decode an image and display it in a simple non-decorated window.
How is possible that java run the SplashScreen even if virtual machine starts if SplashScreen is a java class?
Upvotes: 4
Views: 1052
Reputation: 1479
If you define the splash screen in your jar MANIFEST-file, it is loaded and displayed with native code before the Java VM is started. No need to load a class in that case. Later, you can get the SplashScreen instance to edit and/or close it.
Manifest entry:
SplashScreen-Image: images/splash.gif
Or command line option:
-splash:images/nnn.gif
Java Platform, Standard Edition (Java SE, formerly known as J2SE) version 6, provides a solution that allows the application to show the splash screen much earlier, even before the virtual machine starts. Now, a Java application launcher is able to decode an image and display it in a simple nondecorated window.
Source: http://www.oracle.com/technetwork/articles/javase/splashscreen-135938.html
Upvotes: 5