From: Jim Procter Date: Wed, 17 Jun 2015 14:53:41 +0000 (+0100) Subject: JAL-1783 add java 1.7 and 1.8 class numbers X-Git-Tag: Release_2_10_0~479^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f3b9ee1c57282a1233ffec89ec5aae39dc29d25f;p=jalview.git JAL-1783 add java 1.7 and 1.8 class numbers --- diff --git a/utils/getJavaVersion.java b/utils/getJavaVersion.java index 6699035..98747f7 100644 --- a/utils/getJavaVersion.java +++ b/utils/getJavaVersion.java @@ -18,8 +18,11 @@ * along with Jalview. If not, see . * 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; }