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

Windows installer fails to discover where java is located

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      This is a regression introduced by XWIKI-10810

      This is what I get:

      Starting Jetty on port 8080, please wait...
      '"java"' is not recognized as an internal or external command,
      operable program or batch file.
      Press any key to continue . . .
      

      Now if change from:

      if not "%JAVA_HOME%" == "" (
        set JAVA_PATH=%JAVA_HOME\bin:java.exe
      ) else (
        for /f tokens^=2^ delims^=^" %%i in ('reg query HKEY_CLASSES_ROOT\jarfile\shell\open\command /ve') do set JAVAW_PATH=%%i
        set JAVA_PATH=%JAVAW_PATH:\javaw.exe=%\java.exe
        if "%JAVA_PATH%"=="" set JAVA_PATH=java
      )
      

      to

        for /f tokens^=2^ delims^=^" %%i in ('reg query HKEY_CLASSES_ROOT\jarfile\shell\open\command /ve') do set JAVAW_PATH=%%i
        set JAVA_PATH=%JAVAW_PATH:\javaw.exe=%\java.exe
        if "%JAVA_PATH%"=="" set JAVA_PATH=java
      

      then it works...

      Note that on my system JAVA_HOME is not defined.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: