Help us understand the problem. What is going on with this article?

UbuntuにJava8環境構築

More than 5 years have passed since last update.

普通にJavaを入れたい場合には

$ sudo apt-get install openjdk-7-jdk

のような感じでやってたけど,Ubuntu14.04のバージョンではopenjdk-8-jdkのパッケージは入っていないようです.

なので,自前で入れるしかないようです.
インストールするのはopenjdkでは無いですが,oracle-javaもopenjdkも同じような感じらしいので問題ないようです.

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

すると以下のようにインストールが進みました.

Screenshot from 2014-11-27 07:35:39.png

Screenshot from 2014-11-27 07:35:52.png

よしなに2,3度了解とかはいとか選ぶと入ります.
javaが入ったかどうかを確認しましょう

$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

やったね.

それに加えて,環境変数とかの設定をしてくれてJava8をデフォルトに設定する為に以下のパッケージを入れるようです

$ sudo apt-get install oracle-java8-set-default

参考
How to Install Oracle Java 8 (JDK 8u25) In Ubuntu & LinuxMint Via PPA
javaのバージョンを切り替える

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away