Java Test Applet

I wrote this little applet to test java version and link to http://www.java.com if appropriate. It also has an image replacement should no java at all be installed.

I know its a no brainer but if anyone would like it I’ll tidy it up and hand it out.

It did start me thinking whether there was already or should be a common applet that everyone uses to get the user to download REAL java if they need it.

Kev

Yes i’d be interested to see how your jvm detection works.

Im currently doing it by using reflection and see if it can instanciate the class that was introduced for each new JDK release.

Ah, if you just want jvm detection use;


String version = System.getProperty("java.version");

Kev

[quote]I wrote this little applet to test java version and link to http://www.java.com if appropriate. It also has an image replacement should no java at all be installed.
[/quote]
I’d probably like it, for JGF.

At the moment, there’s a webstart checker on there, which took ages to fix all Sun’s shitty bugs where they haven’t bothered to update their broken javascript.

Perhaps…collaborate to make something more “complete”? IIRC the webstart checker only properly works on MSIE - I’m sure it could work on opera + moz, but I’ve not found the code snippets to do that detection on those platforms, and I don’t know javascript and DOM :P.

Perhaps…a table with two boxes side-by-side; one is an applet-based check, the other a webstart-installed check.?

For a caveat as regards checjing java versions, see my post in the ‘your games here’ forum under ‘not a game yet’. I posted some stuff up on webstart and GAGETimer was crapping out with a number format exception. Eventually i found out it was because webstart was using JRockit (which i’d installed the day before to check it out) as its JRE. JRockit was returning something CRAZEEE as the java version, which didn’t do the code in GAGETimer any good because it was looking for a nicely formed 1.4.x type version string…

instead it returned this :


ari-38120-20041118-1131-win-ia32

Ths probably isn’t a problem of course because i wouldn’t imagine many people have JRockit as a client VM, but its YET ANOTHER COMPLICATION to be aware of :slight_smile:

D.