本文介绍了Java Web 启动 - 无法加载资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 jar,当我浏览服务器的 IP 地址时,它可以很好地加载 java web start.一旦我尝试使用服务器 name,我就会收到以下异常:

com.sun.deploy.net.FailedDownloadException:无法加载资源:在 com.sun.deploy.net.DownloadEngine.actionDownload(来源不明)在 com.sun.deploy.net.DownloadEngine.getCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getResource(来源不明)在 com.sun.javaws.LaunchDownload$DownloadTask.call(来源不明)在 java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)在 java.util.concurrent.FutureTask.run(未知来源)在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(未知来源)在 java.lang.Thread.run(未知来源)

包装的异常:

java.io.FileNotFoundException:在 sun.reflect.GeneratedConstructorAccessor2.newInstance(来源不明)在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(未知来源)在 java.lang.reflect.Constructor.newInstance(Unknown Source)在 sun.net.www.protocol.http.HttpURLConnection$6.run(来源不明)在 java.security.AccessController.doPrivileged(Native Method)在 sun.net.www.protocol.http.HttpURLConnection.getChainedException(未知来源)在 sun.net.www.protocol.http.HttpURLConnection.getInputStream(来源不明)在 com.sun.deploy.net.BasicHttpRequest.doRequest(来源不明)在 com.sun.deploy.net.BasicHttpRequest.doRequest(来源不明)在 com.sun.deploy.net.BasicHttpRequest.doGetRequest(来源不明)在 com.sun.deploy.net.DownloadEngine.actionDownload(来源不明)在 com.sun.deploy.net.DownloadEngine.getCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(来源不明)在 com.sun.deploy.net.DownloadEngine.getResource(来源不明)在 com.sun.javaws.LaunchDownload$DownloadTask.call(来源不明)在 java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)在 java.util.concurrent.FutureTask.run(未知来源)在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(未知来源)在 java.lang.Thread.run(未知来源)引起:java.io.FileNotFoundException:在 sun.net.www.protocol.http.HttpURLConnection.getInputStream(来源不明)在 java.net.HttpURLConnection.getResponseCode(来源不明)……还有 15 个

JNLP:

<jar href="/file.jar"/></资源><application-desc main-class="com...."><参数>CD6B172DEC34924D83EA64A61A6550BE1271325929392</参数><参数>http://servername/file.asp</argument><参数>/站点</参数></application-desc></jnlp>

知道我应该寻找什么吗?

解决方案

我已将 Java 代理设置更改为直接连接 - 并且它有效.

I've got a jar that loads great with java web start when I browse through the IP address of the server.Once I try the server name instead I get the following exception:

com.sun.deploy.net.FailedDownloadException: Unable to load resource:
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

The wrapped exception:

java.io.FileNotFoundException: 
  at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  at java.lang.reflect.Constructor.newInstance(Unknown Source)
  at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
  at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
  at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
  at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
  at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: 
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
  at java.net.HttpURLConnection.getResponseCode(Unknown Source)
  ... 15 more

JNLP:

<?

Any idea what should I look for?

解决方案

I've changed the java proxy settings to direct connection - and it works.

这篇关于Java Web 启动 - 无法加载资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 18:19