The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
You can deploy Java Web Start applications by using the createWebStartLaunchButton
function of the
Deployment Toolkit script. Java Web Start applications are launched using Java Network Launch Protocol (JNLP) The createWebStartLaunchButton
function generates a link (HTML anchor tag - <a>
) to the Java Web Start application's JNLP file.
This generated anchor tag is the Java Web Start application's button. When the end user clicks the Launch button, the Deployment Toolkit script ensures that the appropriate Java Runtime Environment (JRE) software is installed and then launches the Java Web Start application.
http://www.java.com
to allow users to download the latest JRE software.
Function signature: createWebStartLaunchButton: function(jnlp, minimumVersion)
or createWebStartLaunchButton: function(jnlp)
Parameters:
jnlp
– The URL of the JNLP file containing deployment information for the Java Web Start application. This URL should be an absolute path.minimumVersion
– The minimum version of JRE software required to run this applicationUsage:
<script src="https://www.java.com/js/deployJava.js"></script> <script> var url = "http://java.sun.com/javase/technologies/desktop/javawebstart/apps/notepad.jnlp"; deployJava.createWebStartLaunchButton(url, '1.6.0'); </script>
Use the createWebStartLaunchButton: function(jnlp)
function if your application does not have a minimum JRE software version requirement.
createWebStartLaunchButton
functions, you must specify an absolute codebase in the Java Web Start application's JNLP file. This enables the Java Web Start application to be launched from the command line with the javaws <path/to/local JNLP file>
command.