Skip to content

Instantly share code, notes, and snippets.

@ScreamingDev
Created November 21, 2012 22:11
Show Gist options
  • Save ScreamingDev/4128198 to your computer and use it in GitHub Desktop.
Save ScreamingDev/4128198 to your computer and use it in GitHub Desktop.
Install JAVA JDK 64
#!/bin/sh
#
# Requires: JDK
# Optional: Mozilla Firefox
# TODO A 20121121 path as variable
# TODO B 20121121 tar JDK
#
# install
#
# alternatives
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/javaws" 1
sudo update-alternatives --install "/usr/bin/jar" "jar" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/jar" 1
# mozilla
sudo update-alternatives --install "/usr/lib/mozilla/plugins/mozilla-javaplugin.so" "mozilla-javaplugin.so" "/opt/Oracle_Java/jdk1.7.0_VERSION/jre/lib/amd64/libnpjp2.so" 1
#
# configurate
#
# alternatives
sudo update-alternatives --set "java" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/java"
sudo update-alternatives --set "javac" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/javac"
sudo update-alternatives --set "javaws" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/javaws"
sudo update-alternatives --set "jar" "/opt/Oracle_Java/jdk1.7.0_VERSION/bin/jar"
# mozilla
sudo update-alternatives --set "mozilla-javaplugin.so" "/opt/Oracle_Java/jdk1.7.0_VERSION/jre/lib/amd64/libnpjp2.so"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment