Java (Ubuntu): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 44: Zeile 44:
<pre>
<pre>
sudo nano /etc/apt/sources.list
sudo nano /etc/apt/sources.list
</pre>
<pre>
deb http://security.ubuntu.com/ubuntu precise-security main universe
</pre>
<pre>
wget http://launchpadlibrarian.net/159902387/libgif4_4.1.6-11_amd64.deb
sudo apt install /home/martin/Downloads/libgif4_4.1.6-11_amd64.deb
</pre>
</pre>



Version vom 17. Mai 2016, 19:59 Uhr

Akutelle Java-Version prüfen:

java -version

Java herunterladen:

Installation

Falls folgendes Verzeichnis nicht existiert, dann dieses anlegen:

sudo mkdir /opt/Oracle_Java/
wget download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz
tar -xzf jdk-8u92-linux-x64.tar.gz
sudo mv jdk1.8.0_92/ /opt/Oracle_Java/
sudo chown -R root:root /opt/Oracle_Java/jdk1.8.0_92/

Alternativen-System einrichten:

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/Oracle_Java/jdk1.8.0_92/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/Oracle_Java/jdk1.8.0_92/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/Oracle_Java/jdk1.8.0_92/bin/javaws" 1
sudo update-alternatives --install "/usr/bin/jar" "jar" "/opt/Oracle_Java/jdk1.8.0_92/bin/jar" 1 

Alternativen-System konfigurieren:

sudo update-alternatives --set "java" "/opt/Oracle_Java/jdk1.8.0_92/bin/java"
sudo update-alternatives --set "javac" "/opt/Oracle_Java/jdk1.8.0_92/bin/javac"
sudo update-alternatives --set "javaws" "/opt/Oracle_Java/jdk1.8.0_92/bin/javaws"
sudo update-alternatives --set "jar" "/opt/Oracle_Java/jdk1.8.0_92/bin/jar" 

Open JDK 1.7

sudo nano /etc/apt/sources.list
deb http://security.ubuntu.com/ubuntu precise-security main universe
wget http://launchpadlibrarian.net/159902387/libgif4_4.1.6-11_amd64.deb
sudo apt install /home/martin/Downloads/libgif4_4.1.6-11_amd64.deb

Links

https://wiki.ubuntuusers.de/Java/Installation/Oracle_Java/Java_8/#Java-8-JRE


Zurück zu Ubuntu