torti:~ tot$ cat switchjvm.sh
ROOT=/System/Library/Frameworks/JavaVM.framework/Versions
SOFTLINK=$ROOT/CurrentJDK
TARGETA=$ROOT/1.5
TARGETB=$ROOT/1.4
TARGETC=$ROOT/1.6
if [ `readlink "$SOFTLINK"` == $TARGETA ] ;then
rm $SOFTLINK && ln -vsf $TARGETB $SOFTLINK
elif [ `readlink "$SOFTLINK"` == $TARGETB ] ;then
rm $SOFTLINK && ln -vsf $TARGETC $SOFTLINK
else
rm $SOFTLINK && ln -vsf $TARGETA $SOFTLINK
fi
java -version
Nessun commento:
Posta un commento