Posted by
nemesis on
Jun 22, 2011; 2:43am
URL: https://forum.jogamp.org/JOGL-applet-deployment-tp3074893p3093959.html
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.