Jogamp
4b0c760b000b949a00bb3a5da8f27a1c2d5d7404
[jogl-demos.git] / www / applettest-jnlp.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html>
3 <head>
4 <title>JOGL JNLP Applet Test</title>
5 </head>
6 <body>
7
8 <P>
9 In case your <a href="https://jdk6.dev.java.net/plugin2/jnlp/">Java Plugin supports JNLP</a>, 
10 the <em>applet-gears.jnlp</em> is used, 
11 otherwise it shall fallback to <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a>.
12 </P>
13
14 <P>
15 Note that it is important for the startup time to have the same JVM arguments in the applet tags,
16 as well as within the JNLP applet description, here see property <em>sun.java2d.noddraw</em>. <br>
17 Only if JVM arguments of the JNLP applet description are satisfied by the applet tag's JVM,<br>
18 the plugin will not need to start a new JVM. OF course, the applet tag's JVM spec may exceed the
19 JNLP applet's one.
20 </P>
21
22 <P>
23
24 <applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
25       width=600
26       height=400
27       archive="http://jogamp.org/deployment/jogamp-current/jar/applet-launcher.jar,
28                http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar,
29                http://jogamp.org/deployment/jogamp-current/jar/jogl.all.jar,
30                http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar">
31    <param name="codebase_lookup" value="false">
32    <param name="subapplet.classname" value="demos.applets.GearsApplet">
33    <param name="subapplet.displayname" value="JOGL Gears Applet">
34    <param name="noddraw.check" value="true">
35    <param name="progressbar" value="true">
36    <param name="jnlpNumExtensions" value="1">
37    <param name="jnlpExtension1"
38           value="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp">
39    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
40    <param name="jnlp_href" value="applet-gears.jnlp">
41 </applet>
42
43 </P>
44 <P>
45
46 The applet above is instantiated with the following code:
47
48 <pre>
49 &lt;applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
50       width=600
51       height=400
52       archive="http://jogamp.org/deployment/jogamp-current/jar/applet-launcher.jar,
53                http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar,
54                http://jogamp.org/deployment/jogamp-current/jar/jogl.all.jar,
55                http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar"&gt;
56    &lt;param name="codebase_lookup" value="false"&gt;
57    &lt;param name="subapplet.classname" value="demos.applets.GearsApplet"&gt;
58    &lt;param name="subapplet.displayname" value="JOGL Gears Applet"&gt;
59    &lt;param name="noddraw.check" value="true"&gt;
60    &lt;param name="progressbar" value="true"&gt;
61    &lt;param name="jnlpNumExtensions" value="1"&gt;
62    &lt;param name="jnlpExtension1"
63           value="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp"&gt;
64    &lt;param name="java_arguments" value="-Dsun.java2d.noddraw=true"&gt;
65    &lt;param name="jnlp_href" value="applet-gears.jnlp"&gt;
66 &lt;/applet&gt;
67 </pre>
68
69 Where the referenced JNLP file <em>applet-gears.jnlp</em> looks as follow:
70
71 <pre>
72 &lt;?xml version="1.0" encoding="utf-8"?&gt;
73 &lt;jnlp href="applet-gears.jnlp"&gt;
74   &lt;information&gt;
75     &lt;title&gt;JOGL JNLP Applet Gears Demo&lt;/title&gt;
76     &lt;vendor&gt;JogAmp Community&lt;/vendor&gt;
77     &lt;homepage href="http://jogamp.org/jogl-demos/"/&gt;
78     &lt;description&gt;Gears Demo&lt;/description&gt;
79     &lt;description kind="short"&gt;Brian Paul's Gears demo ported to Java and JOGL.&lt;/description&gt;
80     &lt;offline-allowed/&gt;
81   &lt;/information&gt;
82
83     &lt;resources&gt;
84       &lt;j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/&gt;
85       &lt;property name="sun.java2d.noddraw" value="true"/&gt;
86       &lt;jar href="http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar" main="true"/&gt;
87       &lt;jar href="http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos-util.jar"/&gt;
88       &lt;extension name="newt-all-awt" href="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" /&gt;
89     &lt;/resources&gt;
90
91   &lt;applet-desc 
92       name="Gears-Applet"
93       main-class="demos.applets.GearsApplet"
94       width="640" 
95       height="480"&gt;
96   &lt;/applet-desc&gt;
97 &lt;/jnlp&gt;
98 </pre>
99
100 </P>
101 <P>
102
103 Note that the jogl-demos.jar, which contains the GearsApplet class,
104 <B>does not need to be signed</B>! JogAmp Community signs
105 applet-launcher.jar, jogl.jar and gluegen-rt.jar, which contain the
106 JNLPAppletLauncher and JOGL's supporting classes; this is the only
107 Java code which needs to be signed in order to deploy applets using
108 JOGL and is the only certificate the end user must accept.
109
110 </P>
111 <P>
112
113 The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher
114 home page</a> contains more information about what files must be
115 placed on the web server in order to enable the deployment of applets
116 using JOGL and other extensions.
117
118 </P>
119
120 </body>
121 </html>
http://JogAmp.org git info: FAQ, tutorial and man pages.