Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12141

Solr does not start on Windows and Linux/Mac with Java 10 or later

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 7.0, 7.1, 7.2, 7.3
    • Fix Version/s: 7.3
    • Component/s: scripts and tools
    • Labels:
      None
    • Environment:

      Windows 10 with Java 10+

      Description

      If you try to start Solr on Windows with Java 10, it fails with the following message:

      C:\Users\Uwe Schindler\Desktop\solr-7.3.0\bin>solr start -e techproducts
      
      ERROR: Java 1.8 or later is required to run Solr. Current Java version is: 10
      

      Java 8 and Java 9 works. I did not try Linux, but the version parsing on Windows is so braindead (i tried to fix it for Java 9 already). Windows CMD shell does not know any numerical comparisons, so it fails as "10" is alphabetically smaller "9".

      I hope this is better on Linux.

      Why do we have the version check at all? Wouldn't it be better to simply wait for a useful message by the Java VM on startup because of wrong class file format? This is too simply to break, especially as the output of "java -version" is not standardized (and changes with Java 10 to also have a date code,...). It also may contain "openjdk" instead of "java".

      So please please, let's get rid of the version check!

        Attachments

        1. SOLR-12141.patch
          5 kB
          Uwe Schindler
        2. SOLR-12141.patch
          4 kB
          Uwe Schindler
        3. SOLR-12141.patch
          2 kB
          Uwe Schindler
        4. SOLR-12141.patch
          2 kB
          Uwe Schindler
        5. SOLR-12141.patch
          1 kB
          Uwe Schindler
        6. SOLR-12141.patch
          1.0 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              uschindler Uwe Schindler
              Reporter:
              uschindler Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: