Thursday, July 18, 2013

Installation of JAVA sun jdk 1.6 in Ubuntu box

Installing JAVA in Ubuntu:

Step 1:
Before installing please check your Ubuntu version
To check your version follow this steps
1.On the right corner of you desktop you find the symbol
2.Click on symbol----->About this computer

You could see the below screenshot:

  
 I am using the version Ubuntu 12.10(64 bit)

Step 1:

In order to run the Java program we need Jre(Java Runtime Environment) to be
installed in our system.

To check whether you system is installed with jre run the following command

$ java -version

If jre is not installed then it may show the similar screenshot.


Install jre by running the following command as shown in the Try:command from the above screenshot.

$ sudo apt-get install openjdk-6-jre-headless


This will automatically install jre after couple of steps


It will ask for to continue type : y

After completion run the following command to know the jre is installed sucessfully.

$ java -version



 This completes the Jre Installation.Lets proceed to next step

Step 2:

check whether your system is installed with java by running the following command:
$  javac

You could see the below screenshot If JAVA is not installed


Then try the following command as shown in above screen
Try: follow that thing by selecting the package.

Run this command:

$ sudo apt-get install openjdk-6-jdk



This command will install openjdk-6-jdk automatically.

After Installation You could see the below screen shot by running the command

$ javac


This completes the installation of Java.

For the Conformation you can try the following commands

$ echo JAVA_HOME

This command shows the Java home path.








No comments:

Post a Comment