Java Deployment Overview |
Note: This guide is DEPRECATED. It has been replaced by the JWeb Development, Distribution, and Deployment Guide. If you can't find information you need here, but do see it there, please let us know so we can put it where it belongs. (This version will be kept for JavaSE 6, but is slated to be removed for JavaSE 7.)
There are two types of deployment technologies available in Java™ Standard Edition (Java SE) for deploying client-side Java applications on the desktop:
Many similar deployment features between Java Plug-in and Java
Web Start have been consolidated. The focus of this guide is to outline common
deployment features and general deployment practices for both products.
To deploy a Java applet or application, one must first decide how to deploy
the JRE (Java Runtime Environment) . The JRE is available in many
install formats for download and
manual install. An automatic download and
install is available for deploying JRE and applications through
the browsers on Windows. Enterprise developers or ISVs who would like the JRE to install
silently, can use the silent installation option
in the installer. For developers and ISVs deploying the Java Platform in
Windows-only environments, they should also check out the
Active Directory deployment option in the installer.
Applets and applications written in the Java Programming language are the main target for deployment. Java Platform, Standard Edition, v 6 API Specification provides the means, along with various compilers and debuggers, to develop applets and applications in the Java Programming language. See Java(TM) Platform, Standard Edition, v 6 API Specification.
If you are migrating applets from Microsoft VM to Sun's Java Virtual Machine, please check out Applet Compatibility, Java Upgrade Guide and System-Wide Repository for tips on the migration.
To deploy applets and applications over the Internet, it is necessary to specify the applets and applications on the web page for download and launch.
For an applet in a web page displayed in a browser using Sun's JVM, the applet must be embedded in the page with the required tagging structure for Java Plug-in. For topics related to Java Plug-in, see the Java Plug-in Developer Guide.
To seamlessly download, cache, and launch an applications from a web page, such a page will need to contain a link to a special Java Network Launch Protocol (JNLP) file on a web server. Java Web Start, which comes with the JRE, will then be able to download, cache, and launch the application. For topics related to JNLP and Java Web Start, see the Java Web Start Developer Guide.
Both Java Plug-in and Java Web Start support the deployment of applets and applications over many types of network protocols (e.g. HTTP, HTTPS, FTP, SOCKS) and many types of security authentication (HTTP Basic, Digest, NTLM).
For deployment of the applets and applications behind a proxy server, Java Plug-in and Java Web Start also provide complete proxy support for various configurations from the browser as well as from the Java Control Panel. See Proxy Configuration.
For applets and applications deployed from servers or connecting to servers, Java Plug-in and Java Web Start also provide complete cookie support as a way for servers to store data on the client side. See Cookie.
Although Java Archive (JAR) is the de facto way to package applets and
applications,
it is not always the most efficient for network download. Two new compression formats
are available for deploying Java applets and applications in Java Plug-in and Java
Web Start: gzip and Pack200.
See Pack200 and Compression.
By default, Java applets and applications deployed using Java Plug-in and Java Web Start are run in a secure sandbox which defines the set of permissions granted to an untrusted application. See Security.
With JAR signing, Java applets and applications deployed using Java Plug-in and Java Web Start are allowed to run outside the sandbox with additional permissions, if the users grant the permissions to the trusted application. See jarsigner on how to properly sign an application for deployment.
To ensure the signed applets and applications will continue to work after deployment even if the certificate has expired, deployers should consider signature timestamp signing. This is fully supported by Java Plug-in and Java Web Start. See Signature Timestamp.
During signature verification and HTTPS server/client authentication, certificates and keys in the default Java keystore are used by Java Plug-in and Java Web Start. In addition, Java Plug-in and Java Web Start also support certificates and keys in the browser and on the smart card for various purposes. See Browser Keystores.
Under the cover of Java Plug-in and Java Web Start, many aspects of the deployment environment, including security access controls, networking configuration, certificate stores, etc., are configurable through deployment configuration properties.
For developers who would like to customize the deployment environment, the deployment configuration file can be used for customization.
For enterprise developers or ISVs who would like to centrally deploy a configuration to tens of thousands of systems, they can also leverage the enterprise configuration support that is built-into the deployment configuration infrastructure in Java Plug-in and Java Web Start. See Deployment Configuration File and Properties for more details.
For developers or end users who would like to customize a user specific
deployment environment in a user-friendly manner, Java Control Panel is a tool
that can be used to serve this purpose. See Java Control Panel.
Debugging Java applets and applications is often done through Java IDEs or Java
debuggers. In addition, Java Plug-in and Java Web Start have several
built-in facilities that make debugging easier, including Java Console, and
Tracing and Logging.
Java Update is a solution for keeping the Java platform up-to-date
automatically with latest updates on end users' supported Windows platform. Java Update is bundled with the JRE,
so every system with a JRE installed is also Java Update enabled by
default. Java Update keeps most systems up-to-date with latest versions of the
JRE. Therefore, developers are encouraged to take advantage of the latest JRE
features for development, without worrying too much on deploying the latest JRE
on their customers systems. For more information, see Java Update.