forked from npocmaka/batch.scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetJavaVersion.bat
More file actions
15 lines (13 loc) · 548 Bytes
/
getJavaVersion.bat
File metadata and controls
15 lines (13 loc) · 548 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@echo off
rem : ------------------------------
rem :
rem : sets java version as a number to jver
rem : variable in one line.
rem : by Vasil "npocmaka" Arnaudov
rem :
rem : ------------------------------
for /f tokens^=2-5^ delims^=.-_^" %%j in ('java -fullversion 2^>^&1') do set "jver=%%j%%k%%l%%m"
rem : ------------------------------
rem : for execution directly to the command prompt use the line bellow
rem : for /f tokens^=2-5^ delims^=.-_^" %j in ('java -fullversion 2^>^&1') do @set "jver=%j%k%l%m"
rem : ------------------------------