How to extract ONLY the contents of the JDK installer

前端 未结 8 1972
[愿得一人]
[愿得一人] 2021-02-05 17:51

I just downloaded the Java SDK/JDK versions 5 and 6, and I just need the development tools (and some libraries) contained in the installation packages, I don\'t need to perform

8条回答
  •  情书的邮戳
    2021-02-05 18:16

    This is e-egiazarov's script, modified to use unpack200.exe from the JDK archive and also to remove the pack file after conversion.

    @echo off
    
    setlocal enableextensions
    for /r %%f in (*) do call :process %%f
    endlocal
    goto :eof
    
    :process
    if NOT "%~x1" == ".pack" goto :eof
    set FOLDER=%~p1
    
    set PWD=%CD%
    pushd %FOLDER%
    echo Unpacking %~nx1
    %PWD%\bin\unpack200.exe %~nx1 %~n1.jar
    del %~nx1
    popd
    
    goto :eof
    

提交回复
热议问题