Sie sind auf Seite 1von 2

Java-RE installieren

Achtung: Auf richtige Java-Version achten

Prüfen, ob man 32 oder 64bit System hat


file /sbin/init

Prüfen, ob und welche Java-version installiert ist


java -version

Wenn Openjdk oder eine falsche Version installiert ist,


muss die entfernt werden
sudo apt-get purge openjdk-\*

Ein Java-Installationsverzeichnis erstellen


sudo mkdir -p /usr/local/java

Paket herunterladen
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Das Archiv dorthin kopieren


sudo cp -r jre-8u101-linux-i586.tar.gz /usr/local/java

Die Rechte richtig setzen


sudo chmod 755 /usr/local/java

Ins Verzeichnis wechseln


cd /usr/local/java

Das Archiv ausführbar machen


sudo chmod a+x jre*

Archiv auspacken
sudo tar xvzf jre-8u101-linux-i586.tar.gz

Umgebungsvariablen im Profil setzen


sudo nano /etc/profile

Am Ende der Datei "profile" Folgendes eintragen


und speichern

JAVA_HOME=/usr/local/java/jre1.8.0_101
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

This command notifies the system that Oracle Java JRE is available for use
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.8.0_101/bin/java" 1

This command notifies the system that Oracle Java Web start is available for use

Page 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jre1.8.0_101/bin/
javaws" 1

This command will set the Java runtime environment for the system
sudo update-alternatives --set java /usr/local/java/jre1.8.0_101/bin/java

This command will set Java Web start for the system
sudo update-alternatives --set javaws /usr/local/java/jre1.8.0_101/bin/javaws

Reload your system wide PATH /etc/profile


. /etc/profile

Test to see if Oracle Java was installed correctly on your system


java -version

Page 2

Das könnte Ihnen auch gefallen