2003/03/13 02:12:17
[org.ibex.core.git] / src / org / xwt / plat / Java2.java
index 6c2ac6f..629858c 100644 (file)
@@ -21,7 +21,10 @@ public class Java2 extends AWT {
 
     public Java2() {
         // disable the focus manager so we can intercept the tab key
-       double version = Double.parseDouble(System.getProperty("java.version", ""));
+       String versionString = System.getProperty("java.version", "");
+       int secondDecimal = versionString.substring(versionString.indexOf('.') + 1).indexOf('.');
+       if (secondDecimal != -1) versionString = versionString.substring(0, secondDecimal);
+       double version = Double.parseDouble(versionString);
        if (version >= 1.4) {
            isJava14 = true;
            try {