[PATCH] check-java-version for Java9

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Mon Jan 9 13:25:54 UTC 2017


Team is back from vacation only today.. Please expect some delay in 
accepting patches..

-Sundar

On 07/01/17, 4:39 PM, Ahmed Ashour wrote:
> 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