Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have ubuntu 12.04 LTS version 64 bit . what is the procedure for installing and running Java for development purpose. I am new to Linux and Unix platform. Thanks in advance

share|improve this question
    
possibly duplicated askubuntu.com/questions/55848/… –  yuan Dec 31 '12 at 6:33
    
Possible duplicate : askubuntu.com/questions/55848/… –  owl Dec 31 '12 at 6:36
1  
Linux is not necessarily UNIX. –  owl Dec 31 '12 at 6:38
add comment

3 Answers 3

On the command line, type:

$ sudo apt-get install openjdk-7-jre

OR

1) Goto http://www.java.com/en/download/linux_manual.jsp 2) Download the 64-bit package.

Installation:

Change to the directory in which you want to install. Type: cd For example, to install the software in the /usr/java/ directory, Type: cd /usr/java/

Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install Java in your home directory or a subdirectory for which you have write permissions. Move the .tar.gz archive binary to the current directory. Unpack the tarball and install Java tar zxvf jre-7u7-linux-x64.tar.gz

The Java files are installed in a directory called jre1.7.0_07 in the current directory. In this example, it is installed in the /usr/java/jre1.7.0_07 directory. When the installation has completed, you will see the word Done. Delete the .tar.gz file if you want to save disk space.

share|improve this answer
1  
thanks and how do I specify the path and class-path ? –  grv.giit Dec 31 '12 at 6:40
1  
docs.oracle.com/javase/tutorial/essential/environment/… will help. Scroll down to "Linux" section. –  owl Dec 31 '12 at 6:43
    
IMO, you are better off with the Oracle JDK rather than OpenJDK as when I used OpenJDK, I could not launch for example AndroidStudio as it checks if your using it and warns you not to. Minecraft game also recommends not to use it as it isn't supported. Most things will work fine with it but some apps check for it and block you even trying. –  brim4brim May 27 '13 at 0:02
add comment

If you are connected to internet then just click on the "Ubuntu Software Center" and type Java in the search box, you will find Java IDE's in result. choose one that you were looking and select Install.

share|improve this answer
    
Please find edited post. Thanks! –  VRU Dec 31 '12 at 6:44
    
thanks veerendar !! –  grv.giit Dec 31 '12 at 6:48
add comment

For my it's much easier to install it from software center, just go to development category java already there, Click to read more information i recommend you, if you need special kind of java, because ubuntu offers an Open JDK

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.