Java-Installation automatisch updaten: Unterschied zwischen den Versionen

Aus Byte-Welt Wiki
Zur Navigation springenZur Suche springen
(Die Seite wurde neu angelegt: „# Install python-software-properties package sudo apt-get install python-software-properties # Add repository to the list of sources sudo add-apt-repositor…“)
 
K
Zeile 1: Zeile 1:
# Install python-software-properties package
+
1. Install python-software-properties package
 
  sudo apt-get install python-software-properties
 
  sudo apt-get install python-software-properties
 
   
 
   
# Add repository to the list of sources
+
2. Add repository to the list of sources
 
  sudo add-apt-repository ppa:webupd8team/java
 
  sudo add-apt-repository ppa:webupd8team/java
 
   
 
   
# Update local software list
+
3. Update local software list
 
  sudo apt-get update
 
  sudo apt-get update
 
   
 
   
# Accept Oracle software license (only required once)
+
4. Accept Oracle software license (only required once)
 
  sudo echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
 
  sudo echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
 
   
 
   
# Install Oracle JDK8
+
5. Install Oracle JDK8
 
  sudo apt-get install oracle-java8-installer
 
  sudo apt-get install oracle-java8-installer
 
   
 
   
# Check if Oracle Java 8 was installed properly
+
6. Check if Oracle Java 8 was installed properly
 
  java -version
 
  java -version
 
   
 
   
# The commend should return an output similar to this:
+
* The commend should return an output similar to this:
#
+
*
# java version "1.8.0_<version>"
+
* java version "1.8.0_<version>"
# Java(TM) SE Runtime Environment (build 1.8.0_<version>)
+
* Java(TM) SE Runtime Environment (build 1.8.0_<version>)
# Java HotSpot(TM) 64-Bit Server VM (build <version>, mixed mode)
+
* Java HotSpot(TM) 64-Bit Server VM (build <version>, mixed mode)
#
+
*
# If the output was sifnificantly different, please try the following command:
+
If the output was sifnificantly different, please try the following command:
# sudo update-java-alternatives -s java-8-oracle
+
sudo update-java-alternatives -s java-8-oracle
  
 
[[Kategorie:Linux]][[Kategorie:Debian]][[Kategorie:Ubuntu]]
 
[[Kategorie:Linux]][[Kategorie:Debian]][[Kategorie:Ubuntu]]

Version vom 29. August 2015, 08:49 Uhr

1. Install python-software-properties package

sudo apt-get install python-software-properties

2. Add repository to the list of sources

sudo add-apt-repository ppa:webupd8team/java

3. Update local software list

sudo apt-get update

4. Accept Oracle software license (only required once)

sudo echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

5. Install Oracle JDK8

sudo apt-get install oracle-java8-installer

6. Check if Oracle Java 8 was installed properly

java -version

  • The commend should return an output similar to this:
  • java version "1.8.0_<version>"
  • Java(TM) SE Runtime Environment (build 1.8.0_<version>)
  • Java HotSpot(TM) 64-Bit Server VM (build <version>, mixed mode)

If the output was sifnificantly different, please try the following command:

sudo update-java-alternatives -s java-8-oracle