Splash screen closes too quickly - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jeremy1967
Posts: 2
Joined: Thu Sep 29, 2011 9:41 pm

Splash screen closes too quickly

I am having an issue where my application's splash screen is closing too quickly (displays less than 1 second). Unfortunately, there is a significant delay before the application window actually displays. According to the Java documentation for splash screens, "The window is closed automatically as soon as the first window is displayed by Swing/AWT". Now, if I run the installed application via a batch file that I create myself, the splash screen remains open until the first window appears as expected. It is only when I run using the generated .exe and it's accompanying .ini file that the problem exists.

Is this a known issue and, if so, is there a work-around?

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Splash screen closes too quickly

Hello and welcome to Advanced Installer forums,

You can try to enable the "Use native Java 6 splash screen API (if available)" option for your java product. This way you will be able to control the splash screen from within your java application.

Here is a link to help you with the splash screen methods.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jeremy1967
Posts: 2
Joined: Thu Sep 29, 2011 9:41 pm

Re: Splash screen closes too quickly

Thanks for the reply.

However, I had previously tried enabling the Java native API to see if that would have any effect but, according to the Java documentation, it is only used "to close the splash screen, change the splash screen image, get the image position/size and paint in the splash screen." There are no methods available to control the display duration of the of the splash screen. Like I said, this does work when run independently of the executable created by Advanced Installer (both in Linux and Windows) so I have to assume the issue lies somewhere within the generated Windows binary.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Splash screen closes too quickly

Hi,

Perhaps our Java Launcher does something which affects the splash screen. Can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it? Also, please mention the command line you are using when launching your application manually.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kfung
Posts: 4
Joined: Fri Apr 13, 2012 11:42 pm

Re: Splash screen closes too quickly

Was there ever a resolution for this issue? I am experiencing the same behavior.

When the java application is launched using the installer created exes, the splash screens appear only for a brief time.

When the Java API checkbox is selected, no splash screens appear.

When the jars are launched from a console session, the splash screens appear and stay longer than the exe launchers.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Splash screen closes too quickly

Hello,

The splash screen is displayed until the application has started (the "main" function of your java application is executed completely). Therefore you can show it for a longer time by modifying your application, that is by delaying the return from your "main" function.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”