Java (Ubuntu): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 38: Zeile 38:
sudo update-alternatives --set "javaws" "/opt/Oracle_Java/jdk1.8.0_92/bin/javaws"
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"  
sudo update-alternatives --set "jar" "/opt/Oracle_Java/jdk1.8.0_92/bin/jar"  
</pre>
== Open JDK 1.7 ==
<pre>
sudo nano /etc/apt/sources.list
</pre>
</pre>



Version vom 17. Mai 2016, 19:45 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

Links

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


Zurück zu Ubuntu