Saturday, April 14, 2012

How to install Java / OpenJDK in Ubuntu

About how to install Java / OpenJDK in different versions and releases of Ubuntu (>= 10.04.4).

To install R, JGR and Deducer in Ubuntu you will need Java - a technology from Oracle (formerly: Sun Microsystems). There are several implementations, of which the free OpenJDK Development Kit (JDK) is the easiest to install and the default version of Java that Ubuntu uses.
  • Installation of OpenJDK
For Ubuntu 10.04.4, 10.10 and 11.04 (32/64-bit) on the official repositories only the 6th version of OpenJDK is available. To install it just run in terminal (with root privileges):
apt-get install -y openjdk-6-jdk

If you have installed other versions of Java, set OpenJDK as default:
update-java-alternatives -s java-6-openjdk

If R is already installed, enable Java support:
R CMD javareconf

For Ubuntu 11.10 and 12.04 (32/64-bit) on the official repositories are available both 6th and 7th versions of OpenJDK. To install one of them just run in terminal (with root privileges):
apt-get install -y openjdk-6-jdk
or
apt-get install -y openjdk-7-jdk

If you have installed also other versions of Java, set OpenJDK as default -
for the 6th version, 32/64-bit:
update-java-alternatives -s java-1.6.0-openjdk
for the 7th version, 32-bit:
update-java-alternatives -s java-1.7.0-openjdk-i386
for the 7th version, 64-bit:
update-java-alternatives -s java-1.7.0-openjdk-amd64

To solve received errors, please, read the post Solving OpenJDK install errors in Ubuntu.

10 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

    Java Online Training Java Online Training JavaEE Training in Chennai Java EE Training in Chennai

    ReplyDelete
  2. Excellent post !!!Everyone are repeating the same concept in their blog, but here I get a chance to know new things . I will also suggest your content to my friends.
    java training center in chennai
    java institutes in chennai

    ReplyDelete
  3. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    Digital Marketing online training

    full stack developer training in pune

    full stack developer training in annanagar

    ReplyDelete
  4. I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
    python training in OMR
    python training in Bangalore
    python training in rajajinagar
    Python training in btm
    Python training in usa

    ReplyDelete
  5. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    Blueprism training in Pune

    Blueprism online training

    Blue Prism Training in Pune

    ReplyDelete
  6. From your discussion I have understood that which will be better for me and which is easy to use. Really, I have liked your brilliant discussion. I will comThis is great helping material for every one visitor. You have done a great responsible person. i want to say thanks owner of this blog.

    Data science training in tambaram | Data Science training in anna nagar
    Data Science training in chennai | Data science training in Bangalore
    Data Science training in marathahalli | Data Science training in btm

    ReplyDelete
  7. I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks
    java training in chennai

    java training in marathahalli | java training in btm layout

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete

  9. Well done! Pleasant post! This truly helps me to discover the solutions for my inquiry. Trusting, that you will keep posting articles having heaps of valuable data. You're the best! 
    angularjs Training in chennai
    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    angularjs-Training in velachery

    ReplyDelete