Thursday Mar 19, 2009

Here's a trick to improve the start up performance of JavaFX apps.

All you need to do is one line addition to your JNLP files.

<update check="background"/>

The update element is used to indicate the preferences for how application updates should be handled by Java Web Start is not set right. The update element can contain the following optional attribute:

check attribute: The check attribute indicates the preference for when the JNLP Client should check for updates, and can have one of the three values:

  1. "always": always check for updates before launching the application.
  2. "timeout" (default): check for updates until timeout before launching the application. If the update check is not completed before the timeout, the application is launched, and the update check will continue in the background.
  3. "background": launch the application while checking for updates in the background.

option 3 will improve the JavaFX app startup time.  

Happy JavaFXing!
Comments:

Why not make this the default?

Posted by Jim on March 19, 2009 at 12:56 PM PDT #

Jim,
It's not an option of JavaFX, it is an option of your JNLP file. They can't make it the default.

Posted by Konstantin on March 20, 2009 at 05:25 AM PDT #

Is it necessary to use <jnlp spec="6.0+"> to make the update element formally take effect? The update element is a new addition in the JNLP spec 6.0.

Posted by Kaz on March 30, 2009 at 08:58 PM PDT #

Wow, I will try this trick out!

Posted by Vance on April 16, 2009 at 07:07 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed