Revision: 5386
          http://sourceforge.net/p/jump-pilot/code/5386
Author:   edso
Date:     2017-03-19 13:43:24 +0000 (Sun, 19 Mar 2017)
Log Message:
-----------
fix java9 --add-exports is used for "9-ea" jre's exclusively, respecting 
manually set JAVA_HOME jre's now

Modified Paths:
--------------
    core/trunk/scripts/oj_windows.bat

Modified: core/trunk/scripts/oj_windows.bat
===================================================================
--- core/trunk/scripts/oj_windows.bat   2017-03-19 12:08:00 UTC (rev 5385)
+++ core/trunk/scripts/oj_windows.bat   2017-03-19 13:43:24 UTC (rev 5386)
@@ -72,17 +72,26 @@
 echo Using '%JAVA_BIN%' found in '%dirname%'
 rem "%dirname%java" -version
 SET concat=
-for /f "tokens=* delims=" %%i in ('"%dirname%java" -version 2^>^&1') do call 
:concat "; " %%i
+for /f "tokens=* delims=" %%i in ('"%dirname%java" -version 2^>^&1') do (
+    call :concat "; " %%i
+    for /F "tokens=1-3 delims= " %%a in ("%%i") do (
+       rem -- memorize version number string --
+       if "%%a"=="java" ( 
+           if "%%b"=="version" ( 
+               set JAVAVER=%%c
+           )
+       )
+    )
+)
 set "JAVA_VERSIONSTRING=%concat%"
+rem -- print java version string all in one line --
 echo %JAVA_VERSIONSTRING%
 
-rem -- get java version (for processing) --
+rem -- strip doublequotes from version number --
+set JAVAVER=%JAVAVER:"=%
 
-for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
-    rem @echo Output: %%g
-    set JAVAVER=%%g
-)
-set JAVAVER=%JAVAVER:"=%
+rem -- split java version (for processing) --
+
 rem @echo Output: %JAVAVER%
 
 for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to