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

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

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: