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

Start script for windows fails with 32bit JRE

    XMLWordPrintableJSON

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.patch
          5 kB
          Jan Høydahl
        2. solr.cmd
          31 kB
          Christopher Hewitt
        3. solr.cmd.patch
          9 kB
          Christopher Hewitt
        4. SOLR-6693.patch
          9 kB
          Timothy Potter
        5. SOLR-6693.patch
          12 kB
          Timothy Potter
        6. SOLR-6693-lucene_solr_4_10.patch
          12 kB
          Steven Rowe

        Issue Links

          Activity

            People

              sarowe Steven Rowe
              janhoy Jan Høydahl
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: