Hi all,

Nashorn build tests in Windows fails, two issues are identified:
1- Executing JDK-8130127.js hangs the process, simply it waits forever at:

       [testng] Test(compile, run): test\script\nosecurity\JDK-8130127.js

    2- Handling double quotes and spaces in JAVA_HOME is not handled

Versions used:
    - Windows 7
    - Java 9 build 151 (64-bit)
    - Ant 1.10.0

I couldn't get around issue #1, so I ended up commenting the last call of JDK-8130127.js.

Far below are the two scenarios of JAVA_HOME setting.

Hope you find this useful.

Thanks,
Ahmed


scenario #1: double quotes with spaces

        C:\nashorn\make>SET JAVA_HOME="c:\Program Files\Java\jdk-9"

        C:\nashorn\make>ant test
        Files\Java\jdk-9"" was unexpected at this time.


scenario #2: double quotes without spaces, and commenting the last call of JDK-8130127.js
        C:\nashorn\make>SET JAVA_HOME="c:\Progra~1\Java\jdk-9"

        there is an error int report document:

        runTest
"java.nio.file.InvalidPathException: Illegal char <"> at index 0: "c:\Progra~1\Java\jdk-9"\bin\jjs.exe at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)

        which is different if no double quotes is used:
        C:\nashorn\make>SET JAVA_HOME=c:\Progra~1\Java\jdk-9

        which gives the expected error:

Caused by: java.lang.AssertionError: Program output for test\script\nosecurity\JDK-8130127.js ends prematurely at line 5

Reply via email to