#!/bin/bash
zypper -q -n remove java-1_6_0-sun java-1_6_0-sun-plugin java-1_6_0-sun-alsa || :
zypper -q -n in java-1_7_0-sun java-1_7_0-sun-plugin java-1_7_0-sun-alsa || :
cd /etc/alternatives
ln -sf /usr/lib64/jvm/jre-1.7.0-sun jre
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/java java
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/javaws javaws
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/ControlPanel ControlPanel
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/keytool keytool
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/policytool policytool
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/rmid rmid
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/rmiregistry rmiregistry
ln -sf /usr/lib64/jvm/jre-1.7.0-sun/bin/tnameserv tnameserv
ln -sf /usr/lib64/jvm-exports/jre-1.7.0-sun jre_sun
ln -sf /usr/lib64/jvm-exports/jre-1.7.0-sun jre_exports
zypper -q -n remove java-1_6_0-ibm || :


