在 jnlp 文件中引用 jar
我有以下 JNLP 文件。我已经创建了适当的文件夹,当下载 jnlp 文件时,控制台上会显示系统找不到指定路径的消息。
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.5" codebase="http://localhost:8080/myapp/jars">
<information>
<title>MyApp</title>
<vendor>MyApp</vendor>
</information>
<resources>
<jar href="main.jar"/>
<jar href="jcalendar.jar"/>
<jar href="apps/jdi.jar"/>
<jar href="JGo.jar"/>
</resources>
<security>
<all-permissions/>
</security>
<application-desc main-class="com.myapp.jars.Main">
</application-desc>
</jnlp>
Java Web Start 1.6.0_22
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\
<----------------------------------------------------
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:将跟踪级别设置为
/myapps/jars/main.jar
/myapps/jars/jcalendar.jar
\myapps\jars\apps\jdi.jar(系统找不到指定的路径)
/myapps/jars/jGo.jar
我已经对罐子进行了签名,并将它们放在 jars/apps/jdo.jar 文件夹下
有人可以帮助我吗?
谢谢, Karthik
当我在 jars 文件夹中包含其他 jar 时,控制台抛出 Unable to load the resources file (jdi.jar)
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/myapp/jars/jdi.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$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)
I have the below JNLP file. I have created the appropriate folders, when the jnlp file downloads, message the system cannot find the specified path is seen at the console.
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.5" codebase="http://localhost:8080/myapp/jars">
<information>
<title>MyApp</title>
<vendor>MyApp</vendor>
</information>
<resources>
<jar href="main.jar"/>
<jar href="jcalendar.jar"/>
<jar href="apps/jdi.jar"/>
<jar href="JGo.jar"/>
</resources>
<security>
<all-permissions/>
</security>
<application-desc main-class="com.myapp.jars.Main">
</application-desc>
</jnlp>
Java Web Start 1.6.0_22
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\
<----------------------------------------------------
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
/myapps/jars/main.jar
/myapps/jars/jcalendar.jar
\myapps\jars\apps\jdi.jar(The system cannot find the path specified)
/myapps/jars/jGo.jar
I have the jars signed, and placed them under the folder jars/apps/jdo.jar
Could some one help me.
Thanks,
Karthik
When I include along with other jars within jars folder, the console throws Unable to load the resource file (jdi.jar)
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/myapp/jars/jdi.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$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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
丢失的 jar 是否确实位于 http:// /localhost:8080/myapp/jars/apps/jdi.jar ?如果
jdi.jar
与其他 jar 位于同一位置,请尝试:Is the missing jar really in a folder called
apps
at http://localhost:8080/myapp/jars/apps/jdi.jar ? Ifjdi.jar
is in same place as other jars, try: