Test your applet on different JRE’s
In last post on StringBuffer, Dimitris Andreou commented that it was an old thing. ;-). So, I decided to write something new which is currently going on in Sun Microsystems. Finally I zeroed down on Java SE 6u10 features. Some of them I blogged on my Sun site but here are some more.
Very often this happens. You made a UI in applet and want to check whether the application is working fine on all JRE’s or not. If you are not, then please do it :).?I have seen people still using JDK 1.3. I, myself use jdk1.4.2 for many reasons and it still survive somewhere in the company standards. Now, if you want to check the applet on all JRE’s, welcome to the world of JRE 6u10 features.
Here is the demo:
Write a normal applet code, say Hello World.
import java.awt.*;
import java.applet.Applet;
public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello World",50,50);
} // end of paint
} // end of applet
And now the interesting part, write the HTML file like:
<APPLET CODE="HelloWorld.class" WIDTH=200 HEIGHT=100> <PARAM name="java_version" value="1.5.0_20"> </APPLET>
It will run the applet on JRE 1.5.0_20(if exists on machine). For more generic once, write:
<APPLET CODE="HelloWorld.class" WIDTH=200 HEIGHT=100> <PARAM name="java_version" value="1.4*"> </APPLET>
It will check any flavor of 1.4 like 1.4.2_01 or 1.4.2_10 on your machine. 6u10 rocks ! Remember it will work in IE6 or + and FF3 or +. Ah, I remember, today is FF3 download day. So, please don’t forget to download FF3.











Java,JavaScript,Threading,
Optimization and more with Vaibhav 



June 28th, 2008 at 6:05 pm
[...] -> New Applet feature which we talk in prev. blog. [...]