Skip to main content

Launch your Java 3D applet by using JNLP : Alternative to AppletLauncher

5 replies [Last post]
interactivemesh
Offline
Joined: 2006-06-07

Hi,

to avoid any conflict with the JNLPAppletLauncher on my webpages I switched to the -tag and a corresponding jnlp-file. This requires JRE 6u10+. The following sample is live and can be launched from here:

Applet incl. loading of Java 3D

http://www.interactivemesh.org/testspace/appletpropelleruniverse1200x800...

</p>
<p>

JNLP

http://www.interactivemesh.org/testspace/webstart/propellerUniverseAPP1....

<br />
<?xml version="1.0" encoding="UTF-8"?></p>
<p>        PropellerUniverse 1.0<br />
        InteractiveMesh</p>
<p>        PropellerUniverse 1.0</p>
<p>

A starting point to learn more is 'The Java Tutorial : Deploying With the Applet Tag' http://download-llnw.oracle.com/javase/tutorial/deployment/applet/html.html

August

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
interactivemesh
Offline
Joined: 2006-06-07

Update

[code]
Win XP 32 bit | Java JavaFX
JRE 6u21-b07 | Applet Web Start Applet Web Start
--------------------------------------------------------------
Chrome 5.0 | - x x x
Firefox 3.6.8 | x x x x
IE 8 | x x x x
Opera 10.60 | x x x x
Safari 5.0.1 | - x x/- (1) x

Vista 64 bit bit | Java JavaFX
JRE 6u21-b07 32 64 | Applet Web Start Applet Web Start
--------------------------------------------------------------
Chrome 5.0 x | - x x x
Firefox 3.6.8 x | x x x x
IE 8 x | x x x x
IE 8 x | x x x x
Opera 10.61 x | x x x x
Safari 5.0.1 x | - x x/- (1) x

Win 7 64 bit bit | Java JavaFX
JRE 6u21-b07 32 64 | Applet Web Start Applet Web Start
--------------------------------------------------------------
Chrome 5.0 x | - x x x
Firefox 3.6.8 x | x x x x
IE 8 x | x x x x
IE 8 x | x/- (2) x x/- (2) x
Opera 10.61 x | x x x x
Safari 5.0.1 x | - x x/- (1) x
[/code]

(1) No support of JavaFX/Java-mix : Java interface or JavaTaskBase/RunnableFuture
runs: http://javafx.com/samples/Reversi/index.html
fails: http://weblogs.java.net/blog/malenkov/archive/2010/08/13/real-multi-thre...
fails: http://www.interactivemesh.org/testspace/fxapplethellocube_J3D.html

(2) Java 3D native libraries (OpenGL, DirectX) in
http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp
not found (UnsatisfiedLinkError)

August

zamirathe
Offline
Joined: 2010-07-28

Thought I would give you an update on my recent experience. Chrome on Windows and Chromium under Ubuntu, is launching my applet.

Piece of my php code that creates the applet.
[code]




[/code]

There are two possibilities. One, it is a php file so Chrome may run it differently but I doubt it. Two, I think because I put my class in the code and the main jar in the archive, it runs. The objects that are loaded are in separate jar files, referenced in the jnlp file with download=lazy. Despite this, the Ubuntu laptop and Windows XP desktop in my house that does not have java 3d installed will run this applet in IE, FF, and Chrome. I do not have Opera or Safari so I don't know about those.

Also, the two laptops run Ubuntu 10.04 32 bit with JRE 6u20 and the desktop runs Windows Vista 32 bit with JRE 6u21. They are the latest available for the OS on that computer.

I am not calling the j3d-latest jnlp, but the java3d-1.5.1.jnlp
Message was edited by: zamirathe

This might help too. I think this might be key in the custom jnlp file.

Message was edited by: zamirathe

interactivemesh
Offline
Joined: 2006-06-07

Hi,

these are the results of my test which of the 'leading' web browsers support [b]JNLP[/b]

[code]
Win XP | Java JavaFX
JRE 6u21 | Applet Web Start Applet Web Start
-----------------------------------------------------
Chrome 5.0 | - x x x
Firefox 3.6.8 | x x x x
IE 8 | x x x x
Opera 10.6 | x x x x
Safari 5.0.1 | - x - x
[/code]
Has anybody made different experiences?

August

zamirathe
Offline
Joined: 2010-07-28

I am not able to load an applet using a jnlp file in Chrome on Linux or Windows. It is just blank where the applet should be, not even a space for it. If you type in the address to the jnlp file, it comes up as just a text file. If you try to download it by clicking on Save As, it will save as name.jnlp.txt.

I was able to get it to load on IE 8 (on Windows) and FF 3.6 (on Linux).

jimthev
Offline
Joined: 2003-08-27

Chrome doesn't really like jnlp so your applet page doesn't work at all for it.