Java-Installation automatisch updaten

Aus Byte-Welt Wiki
Zur Navigation springenZur Suche springen

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

Siehe auch