[ https://issues.apache.org/jira/browse/SOLR-8689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16134556#comment-16134556 ]
Uwe Schindler commented on SOLR-8689: ------------------------------------- I rewrote the WIndows startup script, but I stumbled on an issue with the Java 9 command line parser. I asked on the Hotspot Mailing List: http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-August/027962.html {quote} I am currently adapting Apache Solr's startup scripts for Java 9. Linux was already done at the beginning of this year and works perfectly, but Windows brings some problems. I already fixed version number parsing, but I stumbled on the following: In the Windows ".cmd" shell script it uses the following to enable Garbage collection logging to a separate file, if Java 9 is detected: set GC_LOG_OPTS="-Xlog:gc*:file=!SOLR_LOGS_DIR!\solr_gc.log:time,uptime:filecount=9,filesize=20000" The problem is now that "!SOLR_LOGS_DIR!" is already expanded to an absolute Windows Path by the shell and therefore starts with "C:\". The problem is now the colon, which breaks the log parsing. When Java 9 starts it exits with the following parsing error: Invalid -Xlog option '-Xlog:gc*:file=C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\solr\server\logs\solr_gc.log:time,uptime:filecount=9,filesize=20000' If I replace with a simple file name, without path/drive letter it works. How to escape the colon in the drive letter correctly, to me this looks like a bummer? {quote} > bin/solr.cmd does not start with recent Verona builds of Java 9 because of > version parsing issue > ------------------------------------------------------------------------------------------------ > > Key: SOLR-8689 > URL: https://issues.apache.org/jira/browse/SOLR-8689 > Project: Solr > Issue Type: Bug > Components: scripts and tools > Affects Versions: 5.5, 6.0 > Environment: Windows 7 > Reporter: Uwe Schindler > Priority: Blocker > Labels: Java9 > Fix For: 7.0, master (8.0), 7.1 > > > At least on Windows, Solr 5.5 does not start with the shell script using a > Verona-Java-9 JDK: > {noformat} > ***************************************************** > JAVA_HOME = C:\Program Files\Java\jdk-9 > java version "9-ea" > Java(TM) SE Runtime Environment (build > 9-ea+105-2016-02-11-003336.javare.4433.nc) > Java HotSpot(TM) 64-Bit Server VM (build > 9-ea+105-2016-02-11-003336.javare.4433.nc, mixed mode) > ***************************************************** > C:\Users\Uwe Schindler\Desktop\solr-5.5.0\bin>solr start > ERROR: Java 1.7 or later is required to run Solr. Current Java version is: > 9-ea > {noformat} > I don't know if this is better with Linux, but I assume the version parsing > is broken (e.g., String#startsWith, interpret as floating point number,...) > We should fix this before Java 9 gets released! The version numbering scheme > changed completely: http://openjdk.java.net/jeps/223 -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org