16. 7. 2012

Update/Install Java Oracle JDK on Ubuntu 10-12.04

Pokud potrebujete pro nektere program JDK od javy misto OpenJDK, ktere ma dost problemu s vykonem a zobrazenim tak existuje PPA repositar, kde to lze jednoduse updatnout do aktualni verze.

Jak na to:

K pridani PPAv Ubuntu (12.04, 11.10, 11.04 and 10.04):
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer

Pokud vse probehlo bez chyby tak kontrola:
java -version

Meli by jste videt neco podobneho:
java version "1.7.0_04" Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode)

The package installs all the Java binaries, so you can also try "javac -version" which should return "javac 1.7.0_04" and so on (the "_04" part of the version can be different because I'm constantly updating the PPA with the latest Oracle Java 7 version).

If for some reason, the Java version in use is not 1.7.0, you can try to run the following command:
sudo update-java-alternatives -s java-7-oracle

Žádné komentáře: