开发者

Java Applet in JAR File

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 开发者_Go百科and Firefox? I searched on the internet and could not find an answer.


http://java.sun.com/docs/books/tutorial/deployment/jar/run.html

should work

<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)


What doesn't work? Any errors? Does it show up at least?

The HTML is as simple as:

<applet code="class_that_extends_Applet.class" archive="your_signed.jar">
    <param name="param1" value="value1">
    <param name="param2" value="value2">
</applet>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜