简体   繁体   English

为什么 JNLP(Java Web Start)不下载 jar 文件?

[英]Why JNLP (Java Web Start) does not download jar file?

Why Java Web Start does not download Jar files which specified in resources?为什么 Java Web Start 不下载资源中指定的 Jar 文件?

I'm using jdk 1.5 to build my application.我正在使用 jdk 1.5 来构建我的应用程序。 There is good reasons to use jdk 1.5 so that I can not upgrade it.有充分的理由使用 jdk 1.5,因此我无法升级它。

Jdk demo and samples used a servlet to specify location of JNLP and security checking. Jdk 演示和示例使用 servlet 来指定 JNLP 和安全检查的位置。 If I use this servlet, jnlp does not work and its jar files does not download while if write address of jnlp directly in codebase attribute by prefixing file:/localhost/ it works!如果我使用这个 servlet,jnlp 不起作用并且它的 jar 文件不会下载,而如果通过前缀 file:/localhost/ 直接在代码库属性中写入 jnlp 的地址,它会起作用!

I think I found the problem!我想我发现了问题! I was in an exploaded artifact environment which was a location other than actual tomcat/webapps/ROOT so that addresses in jnlp don't match to where they should point to.我在一个 exploaded artifact 环境中,该环境不是实际的 tomcat/webapps/ROOT,因此 jnlp 中的地址与它们应该指向的位置不匹配。 If I package all JWS in a war file and deploy it manually it works fine.如果我将所有 JWS 打包在一个 war 文件中并手动部署它,它就可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM