Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to get plugin version!!!!  RSS feed

mehul savalia
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our current application we have to determine the java plugin version on the client machine!

we have developed one applet which will set the pluging version in one of its public variable and we are trying to access that varibale from java script.

My applet code is

import java.applet.*;
import java.awt.*;

public class JavaVersionDisplayApplet extends Applet
{ private Label m_labVersionVendor;
String version;
public void init(){



public JavaVersionDisplayApplet() //constructor
{ Color colFrameBackground =;
m_labVersionVendor = new Label (" Java Version: " +
" from "+System.getProperty("java.vendor"));
public String getJavaVersion(){
return System.getProperty("java.version");

and my html code is

<head> <title>TTTT</title> </head>

<OBJECT id="JavaVersionDisplayApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="JavaVersionDisplayApplet" WIDTH = "100%" HEIGHT = "100%" codebase = ",3,1,2">
<PARAM NAME = "CODE" VALUE = "JavaVersionDisplayApplet.class" />

<PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.3"/>

var pluginVer = 1.2;
try {

if (document.JavaVersionDisplayApplet.version != null) {
pluginVer = document.JavaVersionDisplayApplet.version.substring(0,3);
//pluginVer = document.myApplet.getJavaVersion().substring(0,3);
catch (e) {

if (pluginVer >= 1.4) {
alert("1_4 ["+pluginVer+"]");

else {
alert("1_3 ["+pluginVer+"]");


now with plugin version 1.4 this code is works fine and with 1.3 it is not working
can anyone tell me why its like that?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!