Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Path setting in Linux

 
Gautam Sathe
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! I have started to learn java programming on Linux Platform. The version of Java is Java 1.6.0_02 and Linux - Fedora Core 6. At present I have to put the command:
%export PATH=/usr/java/jdk1.6.0_02/bin:$PATH
every time I login.

Can anyone please suggest me a permanent way of setting PATH in Linux (Fedora Core 6).

Thanks
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add it in .bashrc.
 
Gautam Sathe
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your prompt reply, Freddy.

I followed the suggestions from you link and it was successfully.

What I did was I edited .bash_profile in the home directory modifying the PATH statement.
PATH=/usr/java/jdk1.6.0_02/bin:$PATH:HOME/bin

The important thing to remember while doing the above changes is to put '/usr/java/jdk1.6.0_02/bin' before $PATH:HOME/bin. As if you put it at the end it takes the version of Java provide by Fedora Core 6 (something called gij).

Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic