在 jnlp 文件中引用 jar

发布于 2024-10-05 09:30:27 字数 2644 浏览 10 评论 0原文

我有以下 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沒落の蓅哖 2024-10-12 09:30:27

丢失的 jar 是否确实位于 http:// /localhost:8080/myapp/jars/apps/jdi.jar ?如果 jdi.jar 与其他 jar 位于同一位置,请尝试:

<jar href="jdi.jar"/>

Is the missing jar really in a folder called apps at http://localhost:8080/myapp/jars/apps/jdi.jar ? If jdi.jar is in same place as other jars, try:

<jar href="jdi.jar"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文