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

Start script for windows fails with 32bit JRE

    Details

      Description

      Reproduce:

      1. Install JRE8 from www.java.com (typically C:\Program Files (x86)\Java\jre1.8.0_25)
      2. Run the command bin\solr start -V

      The result is:
      \Java\jre1.8.0_25\bin\java was unexpected at this time.

      Reason
      This comes from bad quoting of the %SOLR% variable. I think it's because of the parenthesis that it freaks out. I think the same would apply for a 32-bit JDK because of the (x86) in the path, but I have not tested.

      Tip: You can remove the line @ECHO OFF at the top to see exactly which is the offending line

      Solution
      Quoting the lines where %JAVA% is printed, e.g. instead of

        @echo Using Java: %JAVA%
      

      then use

        @echo "Using Java: %JAVA%"
      

      This is needed several places.

        Attachments

        1. SOLR-6693-lucene_solr_4_10.patch
          12 kB
          Steve Rowe
        2. SOLR-6693.patch
          12 kB
          Timothy Potter
        3. SOLR-6693.patch
          9 kB
          Timothy Potter
        4. solr.cmd.patch
          9 kB
          Christopher Hewitt
        5. solr.cmd
          31 kB
          Christopher Hewitt
        6. SOLR-6693.patch
          5 kB
          Jan Høydahl

          Issue Links

            Activity

              People

              • Assignee:
                steve_rowe Steve Rowe
                Reporter:
                janhoy Jan Høydahl
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: