質問

これが私の最初の時間は、Web Startを使用しようとしている、と私は私の実行可能なjarファイルを起動しようとしています。私はjarファイルを起動するためのリンクをクリックするように私は私のWebページから、次のエラーを取得します。誰も私を助けることはできますか? (私も持っているのと同じフォルダにあるJNLPファイルとJAR)チュートリアルからメモ帳の例では、テストページ上の他のリンクから正常に動作します。 jarファイルとJNLPは同じフォルダ内に間違いなくある、まだjarファイルが見つかりません。事前に感謝します。

フォルダ構造ます:

/MyApp
/MyApp/MyApp.jnlp
/MyApp/MyApp.jar

JNLPファイルます:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost/MyApp" href="MyApp.jnlp">
   <information>
      <title>MyApp Demo</title>
      <vendor>Company Name</vendor>
   </information>
   <resources>     
    <jar href="MyApp.jar"/>   
    <j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/>
   </resources>
   <application-desc main-class="MyAppMain"> 
    <argument>arg1</argument> 
    <argument>arg2</argument> 
  </application-desc>
</jnlp>

例外ます:

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost/MyApp/MyApp.jar
    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.downloadJarFiles(Unknown Source)
    at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
    at com.sun.javaws.Launcher.downloadResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(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$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

ラップされた例外ます:

java.io.FileNotFoundException: http://localhost/MyApp/MyApp.jar
    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.downloadJarFiles(Unknown Source)
    at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
    at com.sun.javaws.Launcher.downloadResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareLaunchFile(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$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://localhost/MyApp/MyApp.jar
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    ... 20 more

コンソールます:

Java Web Start 1.6.0_15
Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\username
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
#### Java Web Start Error:
#### Unable to load resource: http://localhost/MyApp/MyApp.jar
役に立ちましたか?

解決

私は、このファイルがロードされない理由のために私のresonを見つけました。これは、権限エラーでした。アカウントは、Windowsのアクセス権を持っているdidntのJARファイルにアクセスしようとしています。私は、EclipseからJARを作成し、自分のデスクトップにそれを輸出し、その後、JNLPディレクトリにそれをコピーされていました。これらの権限は、コピー/貼り付け後のJAR用に変更されませんでした。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top