gpt4 book ai didi

java - 在 jnlp 文件中引用 jar

转载 作者:行者123 更新时间:2023-12-01 05:52:12 24 4
gpt4 key购买 nike

我有以下 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><br/>
</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"><br/>
</application-desc><br/>
</jnlp><br/>

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<p></p>

<h2>0-5: set trace level to </h2>

<p>/myapps/jars/main.jar
/myapps/jars/jcalendar.jar
\myapps\jars\apps\jdi.jar(The system cannot find the path specified)
/myapps/jars/jGo.jar
</p>

我对 jar 进行了签名,并将它们放在 jars/apps/jdo.jar 文件夹下

有人可以帮助我吗?

谢谢,卡西克

当我与 jars 文件夹中的其他 jar 一起包含时,控制台抛出无​​法加载资源文件 (jdi.jar)


com.sun.deploy.net.FailedDownloadException: Unable to load resource: <a href="http://localhost:8080/myapp/jars/jdi.jar" rel="noreferrer noopener nofollow">http://localhost:8080/myapp/jars/jdi.jar</a>
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)

最佳答案

丢失的 jar 确实位于 http://localhost:8080/myapp/jars/apps/jdi.jar 名为 apps 的文件夹中吗? ?如果 jdi.jar 与其他 jar 位于同一位置,请尝试:

<jar href="jdi.jar"/>

关于java - 在 jnlp 文件中引用 jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4316688/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com