SOLR-9760: solr.cmd doesn't need write permission in current directory

This commit is contained in:
Mikhail Khludnev 2016-12-21 00:40:56 +03:00
parent f1e636f561
commit febe0019a1
2 changed files with 5 additions and 12 deletions

View File

@ -275,6 +275,8 @@ Bug Fixes
This reduces the likelihood of a (time-limited) distributed deadlock during concurrent schema updates.
(Mark Miller, Steve Rowe)
* SOLR-9760: Windows script doesn't need write permission (Alex Crome by Mikhail Khludnev)
Other Changes
----------------------

View File

@ -1631,11 +1631,7 @@ set JAVA_MAJOR_VERSION=0
set JAVA_VERSION_INFO=
set JAVA_BUILD=0
"%JAVA%" -version 2>&1 | findstr /i "version" > javavers
set /p JAVAVEROUT=<javavers
del javavers
for /f "tokens=3" %%a in ("!JAVAVEROUT!") do (
FOR /f "usebackq tokens=3" %%a IN (`^""%JAVA%" -version 2^>^&1 ^| findstr "version"^"`) do (
set JAVA_VERSION_INFO=%%a
REM Remove surrounding quotes
set JAVA_VERSION_INFO=!JAVA_VERSION_INFO:"=!
@ -1656,13 +1652,8 @@ GOTO :eof
REM Set which JVM vendor we have
:resolve_java_vendor
set "JAVA_VENDOR=Oracle"
"%JAVA%" -version 2>&1 | findstr /i "IBM J9" > javares
set /p JAVA_VENDOR_OUT=<javares
del javares
if NOT "%JAVA_VENDOR_OUT%" == "" (
set "JAVA_VENDOR=IBM J9"
)
"%JAVA%" -version 2>&1 | findstr /i "IBM J9" > nul
if %ERRORLEVEL% == 1 ( set "JAVA_VENDOR=Oracle" ) else ( set "JAVA_VENDOR=IBM J9" )
set JAVA_VENDOR_OUT=
GOTO :eof