[
https://issues.apache.org/jira/browse/SOLR-6693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Potter updated SOLR-6693:
---------------------------------
Attachment: SOLR-6693.patch
Updated patch that does the following:
* Uses basic parsing of the output from java -version to determine the version;
this addresses the issue Jan found about Windows using whatever from the
registry
* Verifies java.exe exists in %JAVA_HOME%\bin
* Warns user if -server or -d64 are not supported (great addition from Jan)
* Works with spaces and parens in Java and Solr paths
When I backport this to branch5x, I'll have to update the script to verify Java
7 instead of 8 ... Please give this a good review / test as we need to cut 5.0
ASAP.
> Start script for windows fails with 32bit JRE
> ---------------------------------------------
>
> Key: SOLR-6693
> URL: https://issues.apache.org/jira/browse/SOLR-6693
> Project: Solr
> Issue Type: Bug
> Components: scripts and tools
> Affects Versions: 4.10.2
> Environment: WINDOWS 8.1
> Reporter: Jan Høydahl
> Assignee: Timothy Potter
> Labels: bin\solr.cmd
> Fix For: 5.0, Trunk
>
> Attachments: SOLR-6693.patch, SOLR-6693.patch, SOLR-6693.patch,
> solr.cmd, solr.cmd.patch
>
>
> *Reproduce:*
> # Install JRE8 from www.java.com (typically {{C:\Program Files
> (x86)\Java\jre1.8.0_25}})
> # 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
> {noformat}
> @echo Using Java: %JAVA%
> {noformat}
> then use
> {noformat}
> @echo "Using Java: %JAVA%"
> {noformat}
> This is needed several places.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]