Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14772

start_xwiki.sh doesn't work with Java 9 on macOS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 9.8.1
    • Fix Version/s: None
    • Component/s: Jetty resources (Tool)
    • Labels:
    • Environment:
      Java 9
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Apologies I'm brand new to Xwiki, I'm probably filing this in the wrong place but was requested to submit a bug on the forum so this is my best guess.

      With Java 9 on macOS running the latest standalone version of Xwiki with the standard flavour preinstalled I get this error:

      sableye(shand)$ ./start_xwiki.sh
      Starting Jetty on port 8080, please wait...
      ./start_xwiki.sh: line 166: [: java version "9": integer expression expected
      

      I fixed that by changing this line:

      JAVA_VERSION=$(java -version 2>&1 | grep -i version | sed 's/.*version ".*\.\(.*\)\..*"/\1/; 1q')
      

      to:

      JAVA_VERSION=$(java -version 2>&1 | awk -F\" '/version/ {print $2}')
      

      If it's helpful here is the output from that Java version command:

      sableye(shand)$ java -version 2>&1
      java version "9"
      Java(TM) SE Runtime Environment (build 9+181)
      Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
      

      The forum post where I initially asked for help is here: https://forum.xwiki.org/t/trouble-installing-xwiki/713

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                AdamShand Adam Shand
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: