Documentation

The Java™ Tutorials
Hide TOC
Changing the Launch Button更改启动按钮
Trail: Deployment
Lesson: Deployment In-Depth
Section: Deployment Toolkit
Subsection: Deploying a Java Web Start Application

Changing the Launch Button更改启动按钮

You can change your Java Web Start application's Launch button image, if you don't like the default Launch button button or if you have another image that you have standardized on.如果您不喜欢默认Launch button按钮,或者如果您有另一个已标准化的图像,则可以更改Java Web Start应用程序的启动按钮图像。

Use the deployJava.launchButtonPNG variable to point to the location of your Launch button's image.使用deployJava.launchButtonPNG变量指向启动按钮图像的位置。

Variable:变量: deployJava.launchButtonPNG

Usage:用法: Providing an alternate image URL提供备用图像URL

In this example, the Notepad application's Launch button is now an image of Duke waving.在本例中,记事本应用程序的启动按钮现在是杜克挥舞的图像。

<script src="https://www.java.com/js/deployJava.js"></script>
<script> deployJava.launchButtonPNG='https://docs.oracle.com/javase/tutorial/images/DukeWave.gif';
    var url = "https://docs.oracle.com/javase/tutorialJWS/samples/deployment/NotepadJWSProject/Notepad.jnlp";
    deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>

The Notepad application's new Launch button (Duke waving) follows. 记事本应用程序的新启动按钮(杜克挥舞)如下。Click on Duke's image to launch the Notepad application.单击Duke的图像启动记事本应用程序。


Note:  If you don't see the example running, you might need to enable the JavaScript interpreter in your browser so that the Deployment Toolkit script can function properly.如果没有看到示例正在运行,则可能需要在浏览器中启用JavaScript解释器,以便部署工具包脚本能够正常运行。

Previous page: Deploying a Java Web Start Application
Next page: Deploying Without Codebase