gpt4 book ai didi

包中包含的 Java 小程序

转载 作者:行者123 更新时间:2023-11-30 04:59:40 24 4
gpt4 key购买 nike

我可以在包中安装一个小程序吗?即:

bfwd.RedemptionOnline.client

将是包,RedemptionOnlineApplet.class 将位于该包内。如果可以的话,如果它位于 RedemptionOnline.jar 中,您将如何为其创建标签?

这是我正在使用的标签:

<applet code="bfwd/RedemptionOnline/client/RedemptionOnlineApplet" width="1" height="1" archive="RedemptionOnline.jar">
<PARAM NAME="MAYSCRIPT" VALUE="true">
</applet>

这是我收到的错误日志:

Java Plug-in 10.0.0.147
Using JRE version 1.7.0-b147 Java HotSpot(TM) Client VM
User home directory = C:\Users\LordZardeck
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1b1a66b
basic: Plugin2ClassLoader.addURL parent called for http://localhost/redemption/RedemptionOnline.jar
network: Cache entry found [url: http://localhost/redemption/RedemptionOnline.jar, version: null] prevalidated=false/0
network: Connecting http://localhost/redemption/RedemptionOnline.jar with proxy=DIRECT
network: Connecting http://localhost:80/ with proxy=DIRECT
network: Connecting http://localhost/redemption/RedemptionOnline.jar with cookie "PHPSESSID=loub2i9mprilg7ihvjn8g960v1"
network: ResponseCode for http://localhost/redemption/RedemptionOnline.jar : 304
network: Encoding for http://localhost/redemption/RedemptionOnline.jar : null
network: Disconnect connection to http://localhost/redemption/RedemptionOnline.jar
cache: Reading Signers from 5 http://localhost/redemption/RedemptionOnline.jar | C:\Users\LordZardeck\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\4\40bb90c4-62ab3bc6.idx
network: No certificate info for unsigned JAR file: http://localhost/redemption/RedemptionOnline.jar
cache: Read manifest for http://localhost/redemption/RedemptionOnline.jar: read=82 full=82
network: Cache entry not found [url: http://localhost/redemption/, version: null]
network: Cache entry not found [url: http://localhost/redemption/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class, version: null]
network: Connecting http://localhost/redemption/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class with proxy=DIRECT
network: Connecting http://localhost/redemption/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class with cookie "PHPSESSID=loub2i9mprilg7ihvjn8g960v1"
network: Cache entry not found [url: http://localhost/redemption/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class, version: null]
network: Connecting http://localhost/redemption/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class with proxy=DIRECT
network: Connecting http://localhost/redemption/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class with cookie "PHPSESSID=loub2i9mprilg7ihvjn8g960v1"
java.lang.ClassNotFoundException: bfwd.RedemptionOnline.client.RedemptionOnlineApplet
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: load: class bfwd/RedemptionOnline/client/RedemptionOnlineApplet not found.
java.lang.ClassNotFoundException: bfwd.RedemptionOnline.client.RedemptionOnlineApplet
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@1b1a66b
security: Reset deny session certificate store

最佳答案

如果您的 Applet 类打包在 JAR 文件中,该文件可通过 http://example.com/RedemptionOnline.jar 下载,那么您应该在 code 中指定打包类的完整限定名称,并在 archive 中指定 JAR 文件的(相对)公共(public) Web URL(注意:区分大小写!):

<applet code="bfwd.RedemptionOnline.client.RedemptionOnlineApplet" archive="RedemptionOnline.jar">

(我同意 Jon 的观点,包名称应该小写,符合 Java Naming Conventions )

如果您的 Applet 类只是公共(public) Web 内容中的一个松散的 .class 文件,可通过 http://example.com/bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class 下载,那么您应该在 code 中准确指定其(相对)公共(public) Web URL(注意:也区分大小写!):

<applet code="bfwd/RedemptionOnline/client/RedemptionOnlineApplet.class">

您现在了解何时使用句号、何时使用斜杠以及何时添加后缀 .class 了吗?

关于包中包含的 Java 小程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7288122/

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