Hello.
I am complete newbie to JOGL. However, I managed to write my first applet using JOGL and Eclipse. My problem is deployment. If I create a html page containing the following <applet code="org.jdesktop.applet.util.JNLPAppletLauncher" width=600 height=400 align=middle hspace = 0 vspace = 0 archive="viewer.jar, http://jogamp.org/deployment/util/applet-launcher.jar, http://jogamp.org/deployment/webstart/nativewindow.all.jar, http://jogamp.org/deployment/webstart/jogl.all.jar, http://jogamp.org/deployment/webstart/gluegen-rt.jar"> param name="codebase_lookup" value="false"> param name="subapplet.classname" value="com.Viewer3D.Viewer3D"> param name="subapplet.displayname" value="JOGL Test Applet"> param name="noddraw.check" value="true"> param name="progressbar" value="true"> param name="jnlpNumExtensions" value="1"> param name="jnlpExtension1" value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> </applet> (I removed the starting brackets from the param fields becasue it caused the lines not to be displayed in the preview. In the html they are there.) it works like a charm. However, when I copy the .jar files in the folder that contains the html ( and also the native dlls), the applet launcher sayst that it is unable to load the applet. Could someone please tell me what is the correct way of deploying an applet (what files do I need to put in the root directory, etc) and how to format the applet tag so that the applet runs form my server and is not refferencing the jogamp repositories? Is there a step by step deployment tutorial somewhere for JOGL applets? I am expecting the applet to be run on several platforms. How would I go about making sure that users on OSX,Linux, etc can run my applet? Thank you. |
Administrator
|
What is wrong with using JogAmp repositories?
Julien Gouesse | Personal blog | Website
|
Nothing, but this is going to be production code that will be deployed
on I have no idea how many servers. And no one can guarantee that the links on JogAmp won't change over time. So I would prefer having the necessary files on our servers. |
Administrator
|
Here's how I did it for a local applet test, where it reads the files from disk, instead of through a web server. The web server version should be similar, I just haven't tried it yet.
I've tested this on Windows, Linux, and Mac, and it works fine everywhere except in Chrome and Firefox on Mac (see bug 497 at https://jogamp.org/bugzilla/show_bug.cgi?id=497). I've zipped up this example (except for the JOGL JARs) at jws-example.zip. Note that some of the HTML and JNLP files contain filesystem paths. Just change those to your paths and it should work fine. Now, the instructions: - Copy all *-natives-*.jar files for all platforms into a directory. - Copy the JAR with your code in it into the same directory (mine is onetriangle.jar). - Copy applet-launcher.jar, gluegen-rt.jar, jogl.all.jar, nativewindow.all.jar, and newt.all.jar into the same directory. You can cut these down to take less space, but that's an advanced topic - Create a key with "keytool -genkey -keystore testKeys -alias myalias" - Sign all JARs (yours and JOGLs) with "jarsigner -keystore testKeys my.jar myalias" - Create an applet HTML file. Mine looks like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>OneTriangle Applet Test</title> </head> <body> <P> Test of OneTriangle as an applet. </P> <P> <applet code="org.jdesktop.applet.util.JNLPAppletLauncher" width=600 height=400 archive="applet-launcher.jar, newt.all.jar, nativewindow.all.jar, jogl.all.jar, gluegen-rt.jar, onetriangle.jar"> <param name="codebase_lookup" value="false"> <param name="subapplet.classname" value="name.wadewalker.jogl2tests.onetriangle.OneTriangleAWTApplet"> <param name="subapplet.displayname" value="OneTriangle Applet"> <param name="noddraw.check" value="true"> <param name="progressbar" value="true"> <param name="jnlpNumExtensions" value="1"> <param name="jnlpExtension1" value="JOGL.jnlp"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="jnlp_href" value="OneTriangleApplet.jnlp"> </applet> </P> <P> The applet should be above this. </P> </body> </html> - Create an applet JNLP file. Mine looks like this: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="file://localhost/D:/Users/Wade/Documents/Blog/jws/" href="OneTriangleApplet.jnlp"> <information> <title>OneTriangle Demo</title> <vendor>JogAmp Community</vendor> <homepage href="http://jogamp.org/"/> <description>OneTriangle Demo</description> <description kind="short">The simplest possible JOGL demo - draws one triangle.</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> <extension name="JOGL" href="JOGL.jnlp" /> <jar href="onetriangle.jar" main="true"/> </resources> <applet-desc name="OneTriangleApplet" main-class="name.wadewalker.jogl2tests.onetriangle.OneTriangleAWTApplet" width="600" height="400"> </applet-desc> </jnlp> - Create a JOGL JNLP file. It has to be in a separate file because of a limitation of applet-launcher.jar. Mine looks like this: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="file://localhost/D:/Users/Wade/Documents/Blog/jws/" href="JOGL.jnlp"> <information> <title>JOGL libraries</title> <vendor>JogAmp Community</vendor> <homepage href="http://jogamp.org/"/> <description>JOGL libraries</description> <description kind="short">All JARs and native libraries for JOGL.</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <jar href="gluegen-rt.jar" /> <jar href="nativewindow.all.jar" /> <jar href="jogl.all.jar" /> <jar href="newt.all.jar" /> </resources> <resources os="Windows" arch="x86"> <nativelib href = "gluegen-rt-natives-windows-i586.jar" /> <nativelib href = "jogl-natives-windows-i586.jar" /> <nativelib href = "nativewindow-natives-windows-i586.jar" /> <nativelib href = "newt-natives-windows-i586.jar" /> </resources> <resources os="Windows" arch="amd64"> <nativelib href = "gluegen-rt-natives-windows-amd64.jar" /> <nativelib href = "jogl-natives-windows-amd64.jar" /> <nativelib href = "nativewindow-natives-windows-amd64.jar" /> <nativelib href = "newt-natives-windows-amd64.jar" /> </resources> <resources os="Windows" arch="x86_64"> <nativelib href = "gluegen-rt-natives-windows-amd64.jar" /> <nativelib href = "jogl-natives-windows-amd64.jar" /> <nativelib href = "nativewindow-natives-windows-amd64.jar" /> <nativelib href = "newt-natives-windows-amd64.jar" /> </resources> <resources os="Linux" arch="i386"> <nativelib href = "gluegen-rt-natives-linux-i586.jar" /> <nativelib href = "jogl-natives-linux-i586.jar" /> <nativelib href = "nativewindow-natives-linux-i586.jar" /> <nativelib href = "newt-natives-linux-i586.jar" /> </resources> <resources os="Linux" arch="x86"> <nativelib href = "gluegen-rt-natives-linux-i586.jar" /> <nativelib href = "jogl-natives-linux-i586.jar" /> <nativelib href = "nativewindow-natives-linux-i586.jar" /> <nativelib href = "newt-natives-linux-i586.jar" /> </resources> <resources os="Linux" arch="amd64"> <nativelib href = "gluegen-rt-natives-linux-amd64.jar" /> <nativelib href = "jogl-natives-linux-amd64.jar" /> <nativelib href = "nativewindow-natives-linux-amd64.jar" /> <nativelib href = "newt-natives-linux-amd64.jar" /> </resources> <resources os="Linux" arch="x86_64"> <nativelib href = "gluegen-rt-natives-linux-amd64.jar" /> <nativelib href = "jogl-natives-linux-amd64.jar" /> <nativelib href = "nativewindow-natives-linux-amd64.jar" /> <nativelib href = "newt-natives-linux-amd64.jar" /> </resources> <resources os="Mac OS X" arch="i386"> <nativelib href = "gluegen-rt-natives-macosx-universal.jar" /> <nativelib href = "jogl-natives-macosx-universal.jar" /> <nativelib href = "nativewindow-natives-macosx-universal.jar" /> <nativelib href = "newt-natives-macosx-universal.jar" /> </resources> <resources os="Mac OS X" arch="x86_64"> <nativelib href = "gluegen-rt-natives-macosx-universal.jar" /> <nativelib href = "jogl-natives-macosx-universal.jar" /> <nativelib href = "nativewindow-natives-macosx-universal.jar" /> <nativelib href = "newt-natives-macosx-universal.jar" /> </resources> <component-desc /> </jnlp> Then double-click on your applet HTML file and watch it run! |
Thanks a lot Wade.
I will try out your method and see what happens. I have one more questions though. You mention the jar files for all platforms, but what about the native .dll/.so files? Should they be in the same folder as the jar files? Thanks again. |
Administrator
|
You're welcome
The native .dll/.so files are inside the *-native-*.jar files. The applet loader takes care of extracting them to the file system and loading them into the JVM, so you don't need copies of the .dll/.so files in your directory. |
Administrator
|
Thanks Wade. Could you put this into the Wiki? It would be very useful.
Julien Gouesse | Personal blog | Website
|
Administrator
|
I'm definitely going to put this information on the wiki, I just have to finish writing up a paper for publication first It's been taking forever, and I've had to cut back on JOGL work during that time.
|
Wade HEEEEEELP!
It's not working! Here is what I did: I put all my files applet-launcher.jar gluegen-rt.jar index.html jogl.all.jar jogl.jnlp nativewindow.all.jar Viewer3DApplet.jnlp viewer.jar in the C:\Workspace\3DApplet\Test folder. My index.html file looks like this: <HTML> <BODY> <applet code="org.jdesktop.applet.util.JNLPAppletLauncher" width=700 height=600 align=middle hspace = 0 vspace = 0 archive="viewer.jar, applet-launcher.jar, nativewindow.all.jar, jogl.all.jar, gluegen-rt.jar"> param name="codebase_lookup" value="false"> param name="subapplet.classname" value="com.Viewer3D.Viewer3D"> param name="subapplet.displayname" value="JOGL Test Applet"> param name="noddraw.check" value="true"> param name="progressbar" value="true"> param name="jnlpNumExtensions" value="1"> param name="jnlpExtension1" value="jogl.jnlp"> param name="java_arguments" value="-Dsun.java2d.noddraw=true"> param name="jnlp_href" value="Viewer3Dapplet.jnlp"> </applet> </BODY> </HTML> Again, I removed the starting angled braces fom the params for the sake of tis post. My Viewer3DApplet.jnlp looks like this: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="file://localhost/C:/Workspace/3DApplet/Test/" href="Viewer3DApplet.jnlp"> <information> <title>Viewer3D</title> <vendor>Nemesis</vendor> <homepage href="http://jogamp.org/"/> <description>A 3D Viewer</description> <description kind="short">TestApplet</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <j2se href="http://java.sun.com/products/autodl/j2se/" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> <extension name="jogl" href="jogl.jnlp" /> <jar href="viewer.jar" main="true"/> </resources> <applet-desc name="Viewer3Dapplet" main-class="com.Viewer3D.Viewer3D" width="700" height="600"> </applet-desc> </jnlp> My jogl.jnlp file looks like this <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="file://localhost/C:/Workspace/3DApplet/Test/" href="jogl.jnlp"> <information> <title>JOGL libraries</title> <vendor>JogAmp Community</vendor> <homepage href="http://jogamp.org/"/> <description>JOGL libraries</description> <description kind="short">All JARs and native libraries for JOGL.</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <jar href="gluegen-rt.jar" /> <jar href="nativewindow.all.jar" /> <jar href="jogl.all.jar" /> </resources> <resources os="Windows" arch="x86"> <nativelib href = "gluegen-rt-natives-windows-i586.jar" /> <nativelib href = "jogl-natives-windows-i586.jar" /> <nativelib href = "nativewindow-natives-windows-i586.jar" /> </resources> <resources os="Windows" arch="amd64"> <nativelib href = "gluegen-rt-natives-windows-amd64.jar" /> <nativelib href = "jogl-natives-windows-amd64.jar" /> <nativelib href = "nativewindow-natives-windows-amd64.jar" /> </resources> <resources os="Windows" arch="x86_64"> <nativelib href = "gluegen-rt-natives-windows-amd64.jar" /> <nativelib href = "jogl-natives-windows-amd64.jar" /> <nativelib href = "nativewindow-natives-windows-amd64.jar" /> </resources> <resources os="Linux" arch="i386"> <nativelib href = "gluegen-rt-natives-linux-i586.jar" /> <nativelib href = "jogl-natives-linux-i586.jar" /> <nativelib href = "nativewindow-natives-linux-i586.jar" /> </resources> <resources os="Linux" arch="x86"> <nativelib href = "gluegen-rt-natives-linux-i586.jar" /> <nativelib href = "jogl-natives-linux-i586.jar" /> <nativelib href = "nativewindow-natives-linux-i586.jar" /> </resources> <resources os="Linux" arch="amd64"> <nativelib href = "gluegen-rt-natives-linux-amd64.jar" /> <nativelib href = "jogl-natives-linux-amd64.jar" /> <nativelib href = "nativewindow-natives-linux-amd64.jar" /> </resources> <resources os="Linux" arch="x86_64"> <nativelib href = "gluegen-rt-natives-linux-amd64.jar" /> <nativelib href = "jogl-natives-linux-amd64.jar" /> <nativelib href = "nativewindow-natives-linux-amd64.jar" /> </resources> <resources os="Mac OS X" arch="i386"> <nativelib href = "gluegen-rt-natives-macosx-universal.jar" /> <nativelib href = "jogl-natives-macosx-universal.jar" /> <nativelib href = "nativewindow-natives-macosx-universal.jar" /> </resources> <resources os="Mac OS X" arch="x86_64"> <nativelib href = "gluegen-rt-natives-macosx-universal.jar" /> <nativelib href = "jogl-natives-macosx-universal.jar" /> <nativelib href = "nativewindow-natives-macosx-universal.jar" /> </resources> <component-desc /> </jnlp> I'm not using newt so I removed those references. When I first ran the applet by double clicking the index.html it complained that it couldn't find the gluegen-rt-natives-windows-i586.jar. So I copied it into the above mentionned folder. Then it complained that it couldn't find the jogl-natives-windows-i586.jar. So I copied that as well. Then it complained that it couldn't find the nativewindow-natives-windows-i586.jar. So I copied that as well. On my final run it crashed with the following message: (This is the output from my Java console) Java Plug-in 1.6.0_26 使用中の JRE のバージョン 1.6.0_26-b03 Java HotSpot(TM) Client VM ユーザのホームディレクトリ = C:\Documents and Settings\n-nemes ---------------------------------------------------- c: コンソールウィンドウをクリア f: ファイナライズキューのオブジェクトをファイナライズ g: ガベージコレクト h: このヘルプメッセージを表示 l: クラスローダリストをダンプ m: メモリ使用率を表示 o: トリガログ q: コンソールを非表示 r: ポリシー設定を再ロード s: システムプロパティと配備プロパティをダンプ t: スレッドリストをダンプ v: スレッドスタックをダンプ x: クラスローダキャッシュをクリア 0-5: トレースレベルを <n> に設定 ---------------------------------------------------- 例外: アプリケーションが、現在ローカルにインストールされていないバージョンの JRE (バージョン 1.4+) を要求しました。Java Web Start は、要求されたバージョンのダウンロードおよびインストールを自動で行うことができません。その JRE バージョンを手動でインストールする必要があります。. JNLPException[category: システム設定 : Exception: null : LaunchDesc: <jnlp spec="1.0+" codebase="file://localhost/C:/Workspace/3DApplet/Test/" href="file://localhost/C:/Workspace/3DApplet/Test/Viewer3DApplet.jnlp"> <information> <title>Viewer3D</title> <vendor>Nemesis</vendor> <homepage href="http://jogamp.org/"/> <description>A 3D Viewer</description> <description kind="short">TestApplet</description> <offline-allowed/> </information> <security> <all-permissions/> </security> <update check="background" policy="always"/> <resources> <java href="http://java.sun.com/products/autodl/j2se/" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> <extension href="file://localhost/C:/Workspace/3DApplet/Test/jogl.jnlp" name="jogl"/> <jar href="file://localhost/C:/Workspace/3DApplet/Test/viewer.jar" download="eager" main="true"/> </resources> <applet-desc name="Viewer3Dapplet" main-class="com.Viewer3D.Viewer3D" documentbase="file:/C:/Workspace/3DApplet/Test/index.html" width="700" height="600"/> </jnlp> ] at sun.plugin2.applet.JNLP2Manager.downloadJREResource(Unknown Source) at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source) at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 例外: JNLPException[category: システム設定 : Exception: null : LaunchDesc: <jnlp spec="1.0+" codebase="file://localhost/C:/Workspace/3DApplet/Test/" href="file://localhost/C:/Workspace/3DApplet/Test/Viewer3DApplet.jnlp"> <information> <title>Viewer3D</title> <vendor>Nemesis</vendor> <homepage href="http://jogamp.org/"/> <description>A 3D Viewer</description> <description kind="short">TestApplet</description> <offline-allowed/> </information> <security> <all-permissions/> </security> <update check="background" policy="always"/> <resources> <java href="http://java.sun.com/products/autodl/j2se/" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> <extension href="file://localhost/C:/Workspace/3DApplet/Test/jogl.jnlp" name="jogl"/> <jar href="file://localhost/C:/Workspace/3DApplet/Test/viewer.jar" download="eager" main="true"/> </resources> <applet-desc name="Viewer3Dapplet" main-class="com.Viewer3D.Viewer3D" documentbase="file:/C:/Workspace/3DApplet/Test/index.html" width="700" height="600"/> </jnlp> ] OK. I'm on a Japanese Windows XP with IE8. And what it says is that the requested JRE (1.4+) is different than the one I have installed on my machine (1.6.0_26) and it cannot download and/or install it, and I should do that manually. I tried changing the <java href="http://java.sun.com/products/autodl/j2se/" version="1.4+"/> to <java href="http://java.sun.com/products/autodl/j2se/" version="1.6+"/> and <java href="http://java.sun.com/products/autodl/j2se/" version="1.6"/> but nothing worked. Do you have any idea how to solve this? Also, as you can see, with the current jnlps the application needs the -natives-platform jars. Could this be the reason it didn't work on the mac? Thank you. |
Sorry Wade !
I just reviewed your first post and you specifically said to copy the -natives-platform jars into the applet directory. I had them confused with the native DLLs. My bad. Need more sleep:). |
I FIGURED IT OUT!
The applet jlnp file was missing a tag: The correct way to write it is: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="file://localhost/C:/Workspace/3DApplet/Test/" href="Viewer3DApplet.jnlp"> <information> <title>Viewer3D</title> <vendor>Nemesis</vendor> <homepage href="http://jogamp.org/"/> <description>A 3D Viewer</description> <description kind="short">TestApplet</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <j2se href="http://java.sun.com/products/autodl/j2se/" version="1.4+"/> <j2se version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> <extension name="jogl" href="jogl.jnlp" /> <jar href="viewer.jar" main="true"/> </resources> <applet-desc name="Viewer3Dapplet" main-class="com.Viewer3D.Viewer3D" width="700" height="600"> </applet-desc> </jnlp> The key was the <j2se version="1.4+"/> tag. If you delete this, you get the aforementioned error. Now the applet works great! Signing all the jars also seems to be critical. If you don't sign them, the applet fails to load. This brings me to another question: Is there a way to sign all the jars in bulk? Like jarsigner -keystore keys *.jar signKeys This does not seem to work, and doing them one by one is so tedious. Also, after the signature expires, do I need to sign them again? Is there a way to sign them forever? Thank you. |
I figured out how to make the applet path independent, so I thought I'd share.
You set "./" as the value for the codebase tag, and if all the files are in the same folder, you can move the folder anywhere and the applet will still run. The final jnlp files are as follow: jogl.jnlp ************************************************* <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="./" href="jogl.jnlp"> <information> <title>JOGL libraries</title> <vendor>JogAmp Community</vendor> <homepage href="http://jogamp.org/"/> <description>JOGL libraries</description> <description kind="short">All JARs and native libraries for JOGL.</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <jar href="gluegen-rt.jar" /> <jar href="nativewindow.all.jar" /> <jar href="jogl.all.jar" /> </resources> <resources os="Windows" arch="x86"> <nativelib href = "gluegen-rt-natives-windows-i586.jar" /> <nativelib href = "jogl-natives-windows-i586.jar" /> <nativelib href = "nativewindow-natives-windows-i586.jar" /> </resources> <resources os="Windows" arch="amd64"> <nativelib href = "gluegen-rt-natives-windows-amd64.jar" /> <nativelib href = "jogl-natives-windows-amd64.jar" /> <nativelib href = "nativewindow-natives-windows-amd64.jar" /> </resources> <resources os="Windows" arch="x86_64"> <nativelib href = "gluegen-rt-natives-windows-amd64.jar" /> <nativelib href = "jogl-natives-windows-amd64.jar" /> <nativelib href = "nativewindow-natives-windows-amd64.jar" /> </resources> <resources os="Linux" arch="i386"> <nativelib href = "gluegen-rt-natives-linux-i586.jar" /> <nativelib href = "jogl-natives-linux-i586.jar" /> <nativelib href = "nativewindow-natives-linux-i586.jar" /> </resources> <resources os="Linux" arch="x86"> <nativelib href = "gluegen-rt-natives-linux-i586.jar" /> <nativelib href = "jogl-natives-linux-i586.jar" /> <nativelib href = "nativewindow-natives-linux-i586.jar" /> </resources> <resources os="Linux" arch="amd64"> <nativelib href = "gluegen-rt-natives-linux-amd64.jar" /> <nativelib href = "jogl-natives-linux-amd64.jar" /> <nativelib href = "nativewindow-natives-linux-amd64.jar" /> </resources> <resources os="Linux" arch="x86_64"> <nativelib href = "gluegen-rt-natives-linux-amd64.jar" /> <nativelib href = "jogl-natives-linux-amd64.jar" /> <nativelib href = "nativewindow-natives-linux-amd64.jar" /> </resources> <resources os="Mac OS X" arch="i386"> <nativelib href = "gluegen-rt-natives-macosx-universal.jar" /> <nativelib href = "jogl-natives-macosx-universal.jar" /> <nativelib href = "nativewindow-natives-macosx-universal.jar" /> </resources> <resources os="Mac OS X" arch="x86_64"> <nativelib href = "gluegen-rt-natives-macosx-universal.jar" /> <nativelib href = "jogl-natives-macosx-universal.jar" /> <nativelib href = "nativewindow-natives-macosx-universal.jar" /> </resources> <component-desc /> </jnlp> ****************************************************** applet jnlp <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="./" href="Viewer3DApplet.jnlp"> <information> <title>Viewer3D</title> <vendor>Nemesis</vendor> <homepage href="http://jogamp.org/"/> <description>A 3D Viewer</description> <description kind="short">TestApplet</description> <offline-allowed/> </information> <update check="background" policy="always"/> <security> <all-permissions/> </security> <resources> <j2se href="http://java.sun.com/products/autodl/j2se/" version="1.4+"/> <j2se version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> <extension name="jogl" href="jogl.jnlp" /> <jar href="viewer.jar" main="true"/> </resources> <applet-desc name="Viewer3Dapplet" main-class="com.Viewer3D.Viewer3D" width="700" height="600"> </applet-desc> </jnlp> ******************************************************** Wade, after you finish publishing your paper, could you please post the "advanced topic" on how to cut down on jar sizes so that only the necessary files are downloaded? Thanks again for all your help! |
Administrator
|
Hi Nemesis,
Glad you got this working! I'm not sure why the "j2se version" tag was required for your and not mine, but I'll add that when I put this info on the wiki. Thanks also for figuring out how to make the paths relative. I tried a few things, but hadn't figured that out yet. I assume that part of the JNLP files will change when you put the applet on a web server instead of running locally. As for signing the JARs in bulk, I think Sven uses a shell script to do this I was planning to write a little Java program that invokes jarsigner programmatically, but I haven't gotten around to it yet. To reduce your download size, you just stop using the *all*.jar files and start using the smaller individual JARs that hold only the code you need. If you look in the JOGL download, you can see there are many other smaller JARs in there with different names. You can look inside them and figure out the minimum set of small JARs you need for your app. There is some information about this at https://jogamp.org/jogl/doc/deployment/JOGL-DEPLOYMENT.html, but it's a little confusing. |
Free forum by Nabble | Edit this page |