Friday, May 4, 2012

Install OpenJDK 7 in [X]ubuntu 12.04/12.10

OpenJDK is the official Ubuntu supported solution for running and compiling Java programs. In this solution separated packages are provided for each need.

Install

Open a terminal window and run:

sudo apt-get install openjdk-7-jre # to be able to run
sudo apt-get install openjdk-7-jdk # to be able to compile
sudo apt-get install icedtea-7-plugin # to be able to run applets on browser

References

Ubuntu package information

6 comments:

  1. Thanks for the commands, Ubuntu Fan

    ReplyDelete
  2. How to install Open JDK or Sun JDK manually on ubuntu 12.04?, thanks!

    ReplyDelete
    Replies
    1. I just wrote a article on how to install Oracle's JDK manually: http://goo.gl/z4D35. I hope it helps.

      Delete
  3. How do I set the "java" command in terminal to use Java 7 instead of the java 6 which comes with xubuntu 12.04 ?

    ReplyDelete
    Replies
    1. sudo update-alternatives --config java

      Delete