From f3b9ee1c57282a1233ffec89ec5aae39dc29d25f Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 17 Jun 2015 15:53:41 +0100 Subject: [PATCH] JAL-1783 add java 1.7 and 1.8 class numbers --- utils/getJavaVersion.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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; } -- 1.7.10.2