JAL-1783 add java 1.7 and 1.8 class numbers
authorJim Procter <jprocter@issues.jalview.org>
Wed, 17 Jun 2015 14:53:41 +0000 (15:53 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 17 Jun 2015 14:53:41 +0000 (15:53 +0100)
utils/getJavaVersion.java

index 6699035..98747f7 100644 (file)
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
-import java.io.*;
-import java.util.*;
+import java.io.DataInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Hashtable;
 import java.util.jar.JarEntry;
 import java.util.jar.JarInputStream;
 
@@ -140,6 +143,9 @@ public class getJavaVersion
       versions.put("48.0", "1.4");
       versions.put("49.0", "1.5");
       versions.put("50.0", "1.6");
+      versions.put("51.0", "1.7");
+      versions.put("52.0", "1.8");
+
     }
     String version = (String) versions.get(major + "."
             + minor);
@@ -149,6 +155,10 @@ public class getJavaVersion
       version = (String) versions.get(major + ".0");
     }
 //    System.err.println("Version "+version);
+    if (version == null)
+    {
+      versions.put(major + "." + minor, "Class v" + major + ".0");
+    }
     return version;
   }