[PATCH] check-java-version for Java9
Ahmed Ashour
asashour at yahoo.com
Sat Jan 7 11:09:55 UTC 2017
Hi all,
The current build checks for Java 8 in check-java-version target,
however this should be for Java 9.
So the user gets the message:
check-java-version:
BUILD FAILED
C:\nashorn\make\build.xml:137: Unsupported Java version: 1.8.
Please use Java version 1.9 or greater.
Instead of:
compile:
[javac] Compiling 1 source file to
C:\nashorn\build\classes\jdk.dynalink
[javac] javac: invalid target release: 1.9
[javac] Usage: javac <options> <source files>
[javac] use -help for a list of possible options
BUILD FAILED
C:\nashorn\make\build.xml:179: Compile failed; see the compiler
error output for details.
Thanks a lot,
Ahmed
diff --git a/make/build.xml b/make/build.xml
--- a/make/build.xml
+++ b/make/build.xml
@@ -129,12 +129,12 @@
</target>
<target name="check-java-version">
- <!-- look for a Class that is available only in jdk1.8 or above -->
+ <!-- look for a Class that is available only in jdk1.9 or above -->
<!-- core/exposed API class is better than an implementation class -->
- <available property="jdk1.8+" classname="java.util.stream.Stream"/>
+ <available property="jdk1.9+" classname="java.lang.ProcessHandle"/>
- <!-- need jdk1.8 or above -->
- <fail message="Unsupported Java version: ${ant.java.version}.
Please use Java version 1.8 or greater." unless="jdk1.8+">
+ <!-- need jdk1.9 or above -->
+ <fail message="Unsupported Java version: ${ant.java.version}.
Please use Java version 1.9 or greater." unless="jdk1.9+">
</fail>
</target>
More information about the nashorn-dev
mailing list