Setting JAVA_HOME and ANT_HOME on Ubuntu / Linux Mint

This might be helpful for the newbies who are starting their career in software development with  Java lang. And of course its not like in old school when it comes to the industry, we use application build tools for proper deployment of enterprise applications. Such commonly used build tool is ‘ apache – ant ‘. Before starting any big work with java and ant, you have to define ‘Java home’ and ‘Ant home’ to make use of them. Follow the following steps by adding few lines to your ‘.bashrc’ file,

Step 01: Locating .bashrc file.
If your on ubuntu, bashrc can be found on home directory as ‘.bashrc’ . If its Linux Mint go to /etc and open ‘bash.bashrc’ as super user mode to edit via a teminal.

sodu gedit bash.bashrc

sodu gedit bash.bashrc

Step 02: Setting ANT_HOME
Include the following block of text at the bottom of your ‘bash.bashrc’ file (if ubuntu, then .bash).

ANT_HOME

ANT_HOME

I have stored my apache-ant folder in ‘/usr/local/’. Change the path according to your apache-ant folder location.

Step 03: Setting JAVA_HOME
Same as you did for ANT_HOME, include the following block of text at the bottom of bash.bashrc file. Include the correct path of java jvm.

JAVA_HOME

JAVA_HOME

You are good to go!

 BTW I’m listening to Pretty Girl (The Way)” by sugarcult. Its really cool :P

About these ads

5 Responses to “Setting JAVA_HOME and ANT_HOME on Ubuntu / Linux Mint”

  1. Semika Says:

    Welcome back :)

  2. Dushan Basnayake Says:

    Hey Thank you for visiting!!!

  3. Junit « sta2838 Says:

    […] 2. http://dushan888.wordpress.com/2012/06/01/setting-java_home-and-ant_home-on-ubuntu-linux-mint/ Share this:TwitterFacebookLike this:LikeBe the first to like this. […]

  4. deivissonpp Says:

    Thanks man! Finally it worked for me.

  5. Dushan Basnayake Says:

    My pleasure mate!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: