install jdk on ubuntu 10.04

How to install Java(JDK) in Ubuntu 10.04

install jdk on ubuntu 10.04

JAVA is now the most widely used programming language for creating applications for web,gadgets,business…So you may want to install JRE(Java Runtime Environment) on your ubuntu 10.04 LTS for compiling and running JAVA based application.

Installing JDK through Command Line in Ubuntu 10.04
Use the following command to install JDK(Java Developement Kit) 6 on your Ubuntu 10.04 LTS
sudo apt-get install openjdk-6-jdk
It will automatically install other dependencies.

Install JAVA(JDK-JRE) from SPM(Synaptic Package Manager) in Ubuntu 10.04

First,search for JDK/java and select the package openjdk-6-jdk by marking for installation.It will ask you to mark some extra dependent softwares for installation,just click ok.Then click on Apply to start the download and installation process.Wait for few minutes until the downloading process will complete and installation will begin.JDK will be installed within few moments.In middle of the installation it will ask you to accept license terms for JRE,check the box to accept the license terms.You are now ready to use Java Development Kit(JDK) for creating java applications.

More Tutorial on How to compile and Run Java programs on Ubuntu 10.04

  • Pingback: Java Programming on Ubuntu 10.04 | Sudobits Blog | Hack to Learn()

  • xipec

    The code only worked after a modifying the place of [] in the Class.
    // A program to print some text.
    public class Welcome
    {
    // main method begins execution of Java application
    public static void main( String [] args )
    {
    System.out.println(“Hello World!”);
    System.out.println( “Welcome to Java Programming! on Ubuntu 10.04″ );
    } // method main ends here
    } // end of the class Welcome

    • http://sudobits.com rkjha

      Thanks Xipec for correction..and now I have just updated ..

  • xipec

    The commentary above refers to the section:
    More Tutorial on How to compile and Run Java programs on Ubuntu 10.04

  • toto

    hey buddy! , that is openjdk not sun java jdk
    which is worthless for development

  • Prakasha N B

    Very nice.I am a trainer in ISAC software.we are using UBUNTU in our classes. the installation is easy .If you want to install JDK on your UBUNTU ,type the following command in command line..

    sudo -get install openjdk-6-jdk

    Prakasha N B

    • http://www.sudobits.com rkjha

      Thanks Mr. Prakash for your valuable comment.

  • manandvan

    is that all or do i need to setup the the environment variables?
    thanks

    • http://www.sudobits.com rkjha

      If you will install it from package manager, then I don’t think that it’s necessary ..if so then just open .bashrc from your home directory and add the path where you have installed the JDK.

  • Riders35

    santosh@santosh-laptop:~$ sudo apt-get install openjdk-6-jdk
    E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

    Tell me how to handle above error ?

    • Raja Ravi Varma

      You need to make sure that “no other installation or un-installation is going on”. If no other installation or un-installation is going on and the error shows up, then possibly some installation is stuck in you system when you were trying to install something in the past.

      Now try this command:
      sudo apt-get update

      After this try installing open-jdk again.