How to extract ONLY the contents of the JDK installer

前端 未结 8 1978
[愿得一人]
[愿得一人] 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:01

    Here's .bat script for unpacking "pack" files. Must be run in the root of unzipped JDK.

    @echo off
    echo **********************
    echo unpack JDK pack-files
    echo **********************
    pause
    
    set JAVA_HOME=c:\glassfish4\jdk7
    
    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
    %JAVA_HOME%\bin\unpack200.exe %~nx1 %~n1.jar
    popd
    
    goto :eof
    

提交回复
热议问题