2010/10/18

A shell script to extract JDK/JRE .pack files using shell

#!/bin/sh

if [ ! -x $1/bin/unpack200 ];then
    echo "Usage: $0 <java_home_dir>"
    exit 1
fi

for i in `find $1 -name '*.pack'`;do
    echo $i
    $1/bin/unpack200.exe $i ${i/%.pack/.jar}
    rm -f $i
done
发表评论