Documentation

The Java™ Tutorials
Hide TOC
Setting Up a Web Server设置Web服务器
Trail: Deployment
Lesson: Java Web Start
Section: Deploying a Java Web Start Application

Setting Up a Web Server设置Web服务器

You might need to configure your web server to handle Java Network Launch Protocol (JNLP) files. 您可能需要配置web服务器来处理Java网络启动协议(JNLP)文件。If the web server is not set up properly, the Java Web Start application will not launch when you click on the link to the JNLP file.如果web服务器设置不正确,当您单击指向JNLP文件的链接时,Java web Start应用程序将不会启动。

Configure the web server so that files with the .jnlp extension are set to the application/x-java-jnlp-file MIME type.配置web服务器,以便将具有.jnlp扩展名的文件设置为application/x-java-jnlp-file MIME类型。

The specific steps to set up the JNLP MIME type will vary depending on the web server. 设置JNLP MIME类型的具体步骤因web服务器而异。As an example, to configure an Apache web server, you should add the following line to the mime.types file.例如,要配置ApacheWeb服务器,应该在mime.types文件中添加以下行。

application/x-java-jnlp-file JNLP

For other web servers, check the documentation for instructions on setting MIME types.对于其他web服务器,请查看文档以了解有关设置MIME类型的说明。


Previous page: Deploying a Java Web Start Application
Next page: Running a Java Web Start Application