确定 jar html 嵌入的类路径
我正在尝试将 JAR 可执行文件作为网络应用程序提供服务。我在计算“code”属性的类路径时遇到问题。 JAR 最初打包在 CD-ROM 上。
双击 JAR 本身 (BDH.jar) 执行 "C:\Program Files\Java\jre6\bin\javaw.exe" -jar "C:\Documents and Settings\xxxx\My Documents\3. Current Projects\BDH\BDH.jar"
双击捆绑的 .exe 执行“Differential Equations.exe”"C:\Documents and Settings\xxxx\My Documents\3. \bin\javaw.exe" -Xms134217728 -Xmx268435456 -classpath "C:\Documents and Settings\xxxx\My Documents\3. 当前项目\BDH\BDH.jar;C:\Documents and Settings\xxxx\My Documents\3当前项目\BDH\lax.jar;” com.zerog.lax.LAX "C:/文档和设置/xxxx/我的文档/3.当前项目/BDH/微分方程.lax" "C:/文档和设置/xxxx/本地设置/Temp/lax29DC.tmp "
这两个都成功启动了应用程序。
哦,我正在使用“applet-fu.js”来尝试加载它。我在 BDH.jar 中发现了一堆可能的类,并尝试加载它们,但没有成功:
applet_fu.run(
{'width':'550','height':'320'},
{
'archive':'BDH.jar',
'code':'com/artmedialab/main/BDH.class'
},
'1.4.2',
'<p>Please install Java.</p>'
);
有希望使这项工作成功吗?
I'm trying to serve an a JAR executable as a web app. I'm having issues figuring out the class path for the "code" attribute. The JAR was originally packaged on a CD-ROM.
Double clicking on the JAR itself (BDH.jar) executes "C:\Program Files\Java\jre6\bin\javaw.exe" -jar "C:\Documents and Settings\xxxx\My Documents\3. Current Projects\BDH\BDH.jar"
Double clicking on the bundled .exe executes "Differential Equations.exe" "C:\Documents and Settings\xxxx\My Documents\3. Current Projects\BDH\jre\bin\javaw.exe" -Xms134217728 -Xmx268435456 -classpath "C:\Documents and Settings\xxxx\My Documents\3. Current Projects\BDH\BDH.jar;C:\Documents and Settings\xxxx\My Documents\3. Current Projects\BDH\lax.jar;" com.zerog.lax.LAX "C:/Documents and Settings/xxxx/My Documents/3. Current Projects/BDH/Differential Equations.lax" "C:/Documents and Settings/xxxx/Local Settings/Temp/lax29DC.tmp"
Both of these launch the app successfully.
Oh, I'm using "applet-fu.js" to try and load this. I found a bunch of likely classes inside BDH.jar and have tried loading them without luck:
applet_fu.run(
{'width':'550','height':'320'},
{
'archive':'BDH.jar',
'code':'com/artmedialab/main/BDH.class'
},
'1.4.2',
'<p>Please install Java.</p>'
);
Any hope of making this work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于这是一个可双击的应用程序,结果我不能将它用作小程序(无论如何,不是没有更改)。显然,通过 Web 分发桌面应用程序的方法是使用 JavaWebStart(有时称为 JNLP)。请参阅 http://download.oracle.com/javase/tutorial/deployment/ webstart/index.html 了解更多详细信息。
Since this is a double-clickable app, turns out I can't use it as an applet (not without changes, anyway). Apparently the way to distribute desktop apps over the web is by using JavaWebStart (sometimes called JNLP). See http://download.oracle.com/javase/tutorial/deployment/webstart/index.html for more details.