JAL-3130 tweaked build.xml to do java 11 bytecode compiling[git branchgit branch...
authorBen Soares <bsoares@dundee.ac.uk>
Mon, 10 Dec 2018 11:01:49 +0000 (11:01 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Mon, 10 Dec 2018 11:01:49 +0000 (11:01 +0000)
build.xml
utils/getJavaVersion.java
utils/showJVMVersion.java [new file with mode: 0644]

index 8eeaf7f..ba88f9a 100755 (executable)
--- a/build.xml
+++ b/build.xml
     <condition property="java11">
       <equals arg1="${ant.java.version}" arg2="11"/>
     </condition>
-    <echo message="java version is ${ant.java.version}"/>
+    <echo message="ant.java.version is ${ant.java.version}"/>
 
     <!-- Don't change anything below here unless you know what you are doing! -->
     <!-- Url path for WebStart in JNLP file -->
     <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
     <property name="j2sev" value="1.7+" />
     <!-- Java Compilation settings - source and target javac version -->
-    <property name="javac.source" value="1.8" />
-    <property name="javac.target" value="1.8" />
+    <property name="javac.source" value="11" if:set="java11" />
+    <property name="javac.target" value="11" if:set="java11" />
+    <property name="javac.source" value="1.8" unless:set="java11" />
+    <property name="javac.target" value="1.8" unless:set="java11" />
+    <echo message="javac.source is ${javac.source}"/>
+    <echo message="javac.target is ${javac.target}"/>
 
     <!-- Permissions for running Java applets and applications. -->
     <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
index 8496f8b..8e09423 100644 (file)
@@ -139,7 +139,7 @@ public class getJavaVersion
     if (versions == null)
     {
       versions = new Hashtable();
-      versions.put("45.3", "1.0");
+      versions.put("45.3", "1.0.2");
       versions.put("45.3", "1.1");
       versions.put("46.0", "1.2");
       versions.put("47.0", "1.3");
@@ -148,6 +148,9 @@ public class getJavaVersion
       versions.put("50.0", "1.6");
       versions.put("51.0", "1.7");
       versions.put("52.0", "1.8");
+      versions.put("53.0", "9");
+      versions.put("54.0", "10");
+      versions.put("55.0", "11");
 
     }
     String version = (String) versions.get(major + "." + minor);
diff --git a/utils/showJVMVersion.java b/utils/showJVMVersion.java
new file mode 100644 (file)
index 0000000..671abc4
--- /dev/null
@@ -0,0 +1,5 @@
+public class showJVMVersion {
+ public static void main(String args[]) {
+   System.out.println(System.getProperty("java.version"));
+ }
+}