Created
July 19, 2018 19:00
-
-
Save miy4mori/199c4e8283416da07f5a24ed547d935d to your computer and use it in GitHub Desktop.
Get JDK from latest version of JDK from Oracle without install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set tool7z="%ProgramFiles%\7-Zip\7z.exe" | |
set jdk_exe="%~dpnx1" | |
call :INFO "Extracting '.rsrc/1033/JAVA_CAB10/111'" | |
%tool7z% e %jdk_exe% .rsrc/1033/JAVA_CAB10/111 | |
call :INFO "Extracting '111'" | |
%tool7z% x 111 | |
call :WARN "Removing '111'" | |
del 111 | |
call :INFO "Extracting 'tools.zip'" | |
%tool7z% x tools.zip -o%~dpn1 | |
call :WARN "Removing 'tools.zip'" | |
del tools.zip | |
call :INFO "Extracting '*.pack'" | |
cd %~dpn1 | |
for /r %%x in (*.pack) do .\bin\unpack200 -r "%%x" "%%~dx%%~px%%~nx.jar" | |
cd .. | |
call :INFO "Extracting '.rsrc/1033/JAVA_CAB9/110'" | |
%tool7z% e %jdk_exe% .rsrc/1033/JAVA_CAB9/110 | |
call :INFO "Extracting '110'" | |
%tool7z% x 110 -o%~dpn1 | |
call :WARN "Removing '110'" | |
del 110 | |
call :INFO "Done." | |
goto :eof | |
:INFO | |
echo ================================================================================ | |
echo INFO:%~1 | |
echo ================================================================================ | |
goto :eof | |
:WARN | |
echo ================================================================================ | |
echo WARN:%~1 | |
echo ================================================================================ | |
goto :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It requires access on the path to 7zip, example:
%ProgramFiles%\7-Zip\7z.exe
.