Java小程序的JAR文件 [英] Java Applet in JAR File
问题描述
我创建了一个Java小程序(.class文件),并提出与它.jar和数字签名的.jar文件。现在我需要运行.jar作为Firefox中的小程序。我把什么在HTML code运行.jar文件作为一个小程序?我试着和它不工作,它会尝试得到一个.class文件,我怎么加载和运行小程序我将使用在Internet Explorer和Firefox applet标记一个.jar文件?我在互联网上搜索,但没有找到答案。
I have created a java applet (.class file) and made a .jar with it and digitally signed the .jar file. Now I need to run the .jar as an applet in firefox. What do I put in the html code to run the .jar file as an applet? I tried and it doesn't work, it tries to get a .class file, how do I load and run my applet as a .jar file using the applet tag in Internet Explorer and Firefox? I searched on the internet and could not find an answer.
推荐答案
<一个href=\"http://java.sun.com/docs/books/tutorial/deployment/jar/run.html\">http://java.sun.com/docs/books/tutorial/deployment/jar/run.html
应该工作
<applet code=TicTacToe.class
archive="TicTacToe.jar"
width=120 height=120>
</applet>
(这个类有主()我认为,罐子是整个事情)
(The class has your main() I assume, the jar is the entire thing)
这篇关于Java小程序的JAR文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!