How to extract ONLY the contents of the JDK installer

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

    a little late to the party

    here's an extractor written in powershell

    param($installdir)
    
    $list=$(gci -Recurse ./$installdir/*.pack) | %{
        return @{
            source=$_.FullName
            parent=$_.Directory.FullName
            target="$($_.Directory.FullName)\$([io.path]::GetFileNameWithoutExtension($_.Name)).jar"
        }
    } | %{
        $result = $(unpack200 $_.source $_.target)
        $_result=$result
        return $_
    }
    
    Write-Host $(ConvertTo-Json $list)
    

提交回复
热议问题