4

原谅我,但我对此很陌生。我的工作计算机上有一个 JNLP 文件,并且可以在家工作。我设置了我的 VPN,并将 JNLP 文件复制/粘贴到我的家用计算机上。但是,当我启动它(我使用 Windows 7 Home Premium 升级到 Java 7)时,我遇到了无法启动应用程序的问题。

它显示无法加载资源,然后

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http: //pbs-sj1/pbs/jnlp/tnp/msgr/alt.jnlp
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

这是在包裹部分下

java.net.UnknownHostException: pbs-sj1
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at com.sun.deploy.net.HttpUtils.followRedirects(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.downloadResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

我在网上做了很多研究,但老实说,大部分似乎都是在开发人员层面。我只是想让 JNLP 文件启动。

有任何想法吗?

4

1 回答 1

2

错误消息告诉您它无法确定您要访问的主机:

java.net.UnknownHostException: pbs-sj1

可能最简单的做法是在您拥有此 .jnlp 文件的盒子上编辑您的主机文件并添加:

127.0.0.1 pbs-sj1

然后确保您的实际 .jnlp 文件位置与您指定的其余路径 (/pbs/jnlp/tnp/msgr/alt.jnlp) 对齐。这是在Win7上编辑主机文件的方法。

-或者-

与其弄乱 Hosts 文件,不如使用文件 URL 来指定在 Windows 上找到 .JNLP 文件的位置——例如,

file:///C:/Documents%20and%20Settings/your_login/alt.jnlp

(我假设您知道将这些地址中的任何一个粘贴/键入到启用 Java 的浏览器的地址栏中)

于 2014-01-28T04:13:16.147 回答