java - Adding parameters using deployjava.js from old applet -
i using deployjava.js deploy applet
<script src="http://java.com/js/deployjava.js"></script><script> var attributes = {codebase: '/devel/app/webroot/jpainter/applet',code: 'painter.class', archive:'painter.jar', width:640, height:480} ; var parameters = {jnlp_href: 'plugin2.jnlp'} ; deployjava.runapplet(attributes, parameters, '1.6'); </script>
the api applet says pass these params (specifically canvas)
i tried this
<script src="http://java.com/js/deployjava.js"></script> <script> var attributes = {codebase: '/devel/app/webroot/jpainter/applet',code: 'painter.class', archive:'painter.jar', width:640, height:480} ; var parameters = {jnlp_href: 'plugin2.jnlp', gui:'canvas.gui'} ; deployjava.runapplet(attributes, parameters, '1.6'); </script>
and not correct. correct way working?
jnlp
<resources> <j2se version="1.4+"/> <jar href="/devel/app/webroot/jpainter/applet/painter.jar"/> </resources> <applet-desc name="painter" main-class="painter" width="640" height="480"> <param name="plugin2" value="true" /> </applet-desc> </jnlp>
in case stumbles upon in future, when call attribute , give location of .jar file, isn't needed reference jnlp.
<script type="text/javascript" src="https://www.java.com/js/deployjava.js"></script> <script type="text/javascript"> var attributes = {name: 'painter', codebase: base_dir + '/app/webroot/jpainter/applet',code: 'painter.class', archive:'painter.jar', width:742, height:262} ; var parameters = {gui:'canvas.gui', image_width:'740', image_height:'260', stroke:'solid3'}; var version = '1.6' ; deployjava.runapplet(attributes, parameters, version); </script>
Comments
Post a Comment