|
Java Web Start - Runtime VersioningJava Web Start can be used to ensure that an application gains a certain minimum version of the JRE (Java Runtime Environment) that it requires to run. Web start can also be used to ensure a specific micro-version of the JRE is available to an application, or that an earlier major release is used (e.g. using 1.3, on a system where 1.6 is installed). Unless the system is correctly configured, the user might be prompted for download. Minimum VersionJava web start can be used to ensure a Java project is launched with a particular minimum version of Java. For example, if the application uses generics, but nothing beyond what is available in Java 1.5, the JNLP deployment descriptor might include a section that says.. .. <resources> <j2se version='1.5+'> ... </resources> Micro VersionBesides being able to specify a minimum Java Major version, the deployer can also mandate a particular micro-version. An example of where this can be handy, might be seen in changes to JRE's based on new information about Daylight Savings Time (which can be changed by regional governments at any time they see the need to change them). .. <resources> <j2se version='1.5.0_11'> ... </resources> Earlier VersionWeb start has a handy feature in that it can allow us to test applications against specific earlier Java versions. For example, if the local build environment is based around 1.6, but an application is supposedly 1.5+, it pays to test the final product in a 1.5 JRE prior to deployment. Invoking a 1.5 JRE in the 1.6 environment can be as simple as. .. <resources> <j2se version='1.5'> ... </resources> Note the difference to the first example, which used '1.5+', whereas this one uses '1.5' - to indicate that only a 1.5 JRE will do. An alternative version.. .. <resources> <j2se version='1.5*'> ... </resources> Prompt for DownloadA problem commonly reported by people deploying applications via web start, is that they are being prompted to download versions of Java that are already locally installed. Even if a specific Java version is installed, it might not be flagged as being 'available' for use by web start. This can be easily fixed. Open the Java Control Panel.
Select the Java tab and click the View button of Java Application Runtime Settings. You might see something like this.
Note which ones are Enabled (right column). This PC is
set up to use
Ensure any versions of interest are Enabled and the problem should be fixed. Web start will be able to load that version of the JRE and use it, without any prompt for download. If you have versions installed that do not appear in the User list, click Find to launch the JRE Finder to search for them. The (Java 1.6) JRE Finder will present a dialog with a message along these lines.
A thread on the web start forum also produced the following comments from Andy Herrick.
He adds a further note on specifying a download source..
|