Java Web start - 无法加载资源 [英] Java web start - Unable to load resource

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

问题描述

当我浏览服务器的IP地址时,我有一个可以通过java web start加载的jar。
尝试服务器名称后,我得到以下异常:

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)

包装的例外:


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:

<?xml version="1.0" encoding="utf-8"?>
<jnlp
    spec="1.0+"
    codebase="http://servername/Site/Views/.."
    href="">
    <information>
        <title>title</title>
        <vendor>vendor</vendor>
        <description>description</description>
        <description kind="short">short</description>
        <icon href="../../icon.gif" />
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>

        <j2se version="1.5+" java-vm-args="-Xmx1000M -Xms150M" initial-heap-size="150M" max-heap-size="1000M" />
        <j2se version="1.4.2+" href="http://java.sun.com/products/autodl/j2se" java-vm-args="-Xmx1000M -Xms150M" initial-heap-size="150M" max-heap-size="1000M" />

        <jar href="/file.jar"/>
    </resources>
    <application-desc main-class="com....">
        <argument>CD6B172DEC34924D83EA64A61A6550BE1271325929392</argument>
        <argument>http://servername/file.asp</argument>
        <argument>/Site</argument>
    </application-desc>
</jnlp>

我知道应该寻找什么?

推荐答案

我已经将java代理设置更改为直接连接 - 并且它可以正常工作。

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

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆