Tuesday, July 10, 2012

Answer by Robert Munteanu for How to deploy a java applet for today's browsers (applet, embed, object)?

 Q: 
How to deploy a java applet for today's browsers (applet, embed, object)?:
How do i deploy a java applet for modern browsers?
I know there are somehow 3 possibilities but nobody tells me which one to prefer and how to use them.

Does somebody have any resources on that? i cant find any :(



Answer by Robert Munteanu for How to deploy a java applet for today's browsers (applet, embed, object)?:
If you have the luxury of targeting Java 6 update 10 or better, you can simplify your life:

<script src="http://java.com/js/deployJava.js"></script>
<script>
    var attributes = {codebase:'http://java.sun.com/products/plugin/1.5.0/demos/jfc/Java2D',
                      code:'java2d.Java2DemoApplet.class',
                      archive:'Java2Demo.jar',
                      width:710, height:540} ;
    var parameters = {fontSize:16} ;
    var version = '1.6' ;
    deployJava.runApplet(attributes, parameters, version);
</script>

No comments:

Post a Comment