Spec-Zone .ru
спецификации, руководства, описания, API
|
Java Web Start leverages existing Internet technology, such as the HTTP protocol and Web servers, so existing infrastructure for deploying HTML-based contents can be reused to deploy Java Technology-based applications using Java Web Start.
In order to deploy your application to client machines, you must make sure that all files containing your application are accessible through a Web server. This typically amounts to copying one or more JAR files, along with a JNLP file, into the Web server's directories. The set-up required for enabling the Web site to support Java Web Start is very similar to deploying HTML-based contents. The only caveat is that a new MIME type needs to be configured for the Web server.
1. Configure the Web server to use the Java Web Start MIME type
Configure the Web server so that all files with the .jnlp file extension are set to the application/x-java-jnlp-file MIME type.
Most Web browsers use the MIME type returned with the contents from the Web server to determine how to handle the particular content. The server must return application/x-java-jnlp-file MIME type for JNLP files in order for Java Web Start to be invoked.
Each Web server has a specific way in which to add MIME types. For example, for the Apache Web server you must add the following line to the .mime.types configuration file:
application/x-java-jnlp-file JNLP
Check the documentation for the specifics of your Web server.
2. Create a JNLP file for the application
The easiest way to create this file is to modify an existing JNLP file to your requirements.
The syntax and format for the JNLP file is described in a later section.
3. Make the application accessible on the Web server
Ensure your application's JAR files and the JNLP file are accessible at the URLs listed in the JNLP file.
4. Create the web page that launches the application
See the next chapter, Creating the Web Page that launches the Application, for details on step 4.