Documentation

The Java™ Tutorials
Hide TOC
Running a Java Web Start Application运行Java Web Start应用程序
Trail: Deployment
Lesson: Java Web Start

Running a Java Web Start Application运行Java Web Start应用程序

Users can run Java Web Start applications in the following ways:用户可以通过以下方式运行Java Web Start应用程序:


Note: To run applications deployed with Java Web Start technology, you must have a compatible version of the Java Runtime Environment (JRE) software. 要运行使用Java Web Start技术部署的应用程序,必须具有Java运行时环境(JRE)软件的兼容版本。The complete Java Java Development Kit (JDK) is not required. 不需要完整的Java开发工具包(JDK)。

Running a Java Web Start Application From a Browser从浏览器运行Java Web Start应用程序

You can run a Java Web Start application from a browser by clicking a link to the application's JNLP file. 通过单击指向应用程序JNLP文件的链接,可以从浏览器运行Java Web Start应用程序。The following text is an example of a link to a JNLP file.以下文本是指向JNLP文件的链接示例。

<a href="/some/path/Notepad.jnlp">Launch Notepad Application</a>

Java Web Start software loads and runs the application based on instructions in the JNLP file.Java Web Start软件根据JNLP文件中的指令加载并运行应用程序。

Try it now: Run Notepad

Running a Java Web Start Application From the Java Cache Viewer从Java缓存查看器运行Java Web Start应用程序

If you are using at least Java Platform, Standard Edition 6 or later, you can run a Java Web Start application through the Java Cache Viewer.如果您至少使用Java平台、Standard Edition 6或更高版本,则可以通过Java缓存查看器运行Java Web Start应用程序。

When Java Web Start software first loads an application, information from the application's JNLP file is stored in the local Java Cache Viewer. 当Java Web Start软件首次加载应用程序时,来自应用程序JNLP文件的信息存储在本地Java缓存查看器中。To launch the application again, you do not need to return to the web page where you first launched it; you can launch it from the Java Cache Viewer.要再次启动应用程序,无需返回首次启动应用程序的网页;您可以从Java缓存查看器启动它。

To open the Java Cache Viewer:要打开Java缓存查看器,请执行以下操作:

  1. Open the Control Panel.打开控制面板。
  2. Double click on the Java icon. 双击Java图标。The Java Control Panel opens.Java控制面板打开。
  3. Select the General tab.选择常规选项卡。
  4. Click View. 单击“查看”。The Java Cache Viewer opens.Java缓存查看器打开。

The application is listed on the Java Cache Viewer screen.该应用程序列在Java缓存查看器屏幕上。

A screen shot of the Java Cache Viewer application

Java Cache Viewer applicationJava缓存查看器应用程序

To run the application, select it and click the Run button, The Run button, or double click the application. 要运行应用程序,请选择它并单击“运行”按钮The Run button,或双击该应用程序。The application starts just as it did from the web page. 应用程序的启动方式与从网页启动时的方式相同。

Running a Java Web Start Application From the Desktop从桌面运行Java Web Start应用程序

You can add a desktop shortcut to a Java Web Start application. 可以向Java Web Start应用程序添加桌面快捷方式。Select the application in the Java Cache Viewer. 在Java缓存查看器中选择应用程序。Right-click and select Install Shortcuts or click the Install button, The Install button.右键单击并选择“安装快捷方式”,或单击“安装”按钮The Install button

A shortcut is added to the desktop.将向桌面添加快捷方式。

You can then launch the Java Web Start application just as you would launch any native application.然后可以像启动任何本机应用程序一样启动Java Web Start应用程序。


Previous page: Setting Up a Web Server
Next page: Java Web Start and Security