Saturday, May 7, 2011

JDK and Idea configuration in Ubuntu 11.04

Configuring the JDK and the JRE

There is a very simple way of configuring the JDK in Ubuntu 11.04 version rather than the former versions.
Go to the shortcut menu in the left hand side and select Ubuntu Software Center and go to the menubar above
select Edit > Software Sources and select Other sources tab and tick Canonical Partners and Canonical Partners(source Code) and close
Then install JRE(Java run-time environment) by typing

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

in the terminal. Let it download and install. Press 'y' if prompted while installing.
then install the JDK by

sudo apt-get install sun-java6-jdk

answer the two questions if prompted while installing as shown here



all the work is done. you can check the whether it's installed properly by using

java -version

then this will display the version and relevant data on your Java installation.
That means Java is installed on your machine.

Installing Intellij Idea

you can download the intellij Idea from

http://www.jetbrains.com/idea/

be sure to download the tar.gz file rather than the rpm file ...(sometimes it will automatically download the Gzip file)

Then cd to your downloaded path "cd PATH"
most probably it would look like this

cd ~/Downloads/                   // here ~ indicates the home folder (/home/usrName)

then type

tar xvf filename.tar.gz

it would look like

tar -xvf ideaUI-10.0.3.tar.gz

then it will unzip the file into a folder and cd into that folder and type

./idea.sh

if everything has been done as mentioned above Idea should be up and running without any complains ..... if there is let me know.

Then the typical procedure . you have to show the path of the JDK in your project.
usually it's located at

/etc/jvm/

If you run into any kind of trouble first try googling it all by yourself (the best way of learning is self studying )if you can't resolve it I'm here to help.
Ubuntu rocks ..... :)

2 comments:

  1. One more addition. I normally create an alias to idea.sh so that I can start IDEA from the command prompt without going to its installed location (if its not in the PATH).

    Also, I think you don't have to explicitly install jre-plugin etc., if you first type "sudo apt-get install sun-java6-jdk". IIRC, it will resolve dependencies and automatically suggest to install these as well.

    ReplyDelete
  2. Thanks Sachith....
    This works pretty interestingly......
    :)

    And a small correction...
    We have to cd to bin first....
    then type ./idea.sh

    ReplyDelete