Documentation

The Java™ Tutorials
Hide TOC
Java Web Start and SecurityJava Web启动与安全
Trail: Deployment
Lesson: Java Web Start

Java Web Start and SecurityJava Web启动与安全

This section describes the basics of security for applications deployed through Java Web Start and includes:本节介绍通过Java Web Start部署的应用程序的安全基础,包括:

Applications launched with Java Web Start are, by default, run in a restricted environment, known as a sandbox. 默认情况下,使用JavaWebStart启动的应用程序在一个被称为“沙箱”的受限环境中运行。In this sandbox, Java Web Start:在这个沙箱中,Java Web Start:

Sandbox applications that are launched by Java Web Start remain in this sandbox, meaning they cannot access local files or the network. Java Web Start启动的沙箱应用程序仍保留在此沙箱中,这意味着它们无法访问本地文件或网络。See Security in Rich Internet Applications for information.有关信息,请参阅富互联网应用程序中的安全性

Dynamic Downloading of HTTPS Certificates动态下载HTTPS证书

Java Web Start dynamically imports certificates as browsers typically do. To do this, Java Web Start sets its own https handler, using the java.protocol.handler.pkgs system properties, to initialize defaults for the SSLSocketFactory and HostnameVerifier. It sets the defaults with the methods HttpsURLConnection.setDefaultSSLSocketFactory and HttpsURLConnection.setDefaultHostnameVerifier.

If your application uses these two methods, ensure that they are invoked after the Java Web Start initializes the https handler, otherwise your custom handler will be replaced by the Java Web Start default handler.如果应用程序使用这两种方法,请确保在Java Web Start初始化https处理程序后调用它们,否则自定义处理程序将被Java Web Start默认处理程序替换。

You can ensure that your own customized SSLSocketFactory and HostnameVerifiter are used by doing one of the following:通过执行以下操作之一,可以确保使用自己定制的SSLSocketFactoryHostnameVerifiter


Previous page: Running a Java Web Start Application
Next page: Common Java Web Start Problems