我的证人最后试图让我的 Java游戏在浏览器中工作。 我已成功地把网络开端应用程序投入运行,但将其转换成一个内部浏览器-窗口的仪表,正把我推向cra。
MYAPPLET.jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp href="MYAPPLET.jar" codebase="http://www.myDomain.com/directoryContainingJar/">
<information>
<title>Name</title>
<vendor>----</vendor>
<offline-allowed />
</information>
<resources>
<j2se version="1.4+"
href="http://java.sun.com/products/autodl/j2se" />
<jar href="MYAPPLET.jar" main="true" />
</resources>
<applet-desc
name="Name"
main-class="main.MainClass"
width="700"
height="600">
</applet-desc>
</jnlp>
在我的档案中:
<applet width="700" height="600" code="main.MainClass">
<param name="jnlp_href" value="MYAPPLET.jnlp">
</applet>
在上页时,我发现这一错误:
ExitException[ 3]MissingFieldException[ The following required field is missing from the launch file: <jnlp>]
at sun.plugin2.applet.JNLP2Manager.redirectLaunchDesc(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
at sun.plugin2.main.client.PluginMain.access$300(Unknown Source)
at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error while initializing manager: ExitException[ 3]MissingFieldException[ The following required field is missing from the launch file: <jnlp>], bail out
我改变了主要类别,以便其<代码>extends JApplet,而不是JFrame
,但除了此以外,我不知道需要做些什么。
是的,我读到和谷歌。