SunQuest
           Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 26th, 2002, 02:26 AM
devhen's Avatar
devhen devhen is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Spanish Fork, UT
Posts: 30 devhen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
edit $PATH variable

How do I edit my $PATH variable so that my java directory is permanantly available in $PATH along with /usr/bin, /usr/local/bin, etc. Thanks.

Reply With Quote
  #2  
Old August 26th, 2002, 02:49 AM
devhen's Avatar
devhen devhen is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Spanish Fork, UT
Posts: 30 devhen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
ok, i was able to edit my $PATH by editing .bash_profile. there is a line that says

PATH=$PATH:$HOME/bin

i changed this to

PATH=$PATH:$HOME/bin:/path/to/java

but if i print my $PATH var it has $HOME/bin and /path/to/java twice each. anyone know why this happens? its not a very big deal because it still works this way.. but its strange.. it must be .bash_profile that is adding the dir's twice because my java directory wasn't in $PATH at all until now.. ??

Reply With Quote
  #3  
Old August 26th, 2002, 02:53 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,711 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 6 Days 4 h 53 m 59 sec
Reputation Power: 259
You can see this tutorial
Quote:
Create a file called 'java.sh' as 'root' in '/etc/profile.d' containing these lines:

JAVA_HOME=/usr/java/j2sdk1.4.0
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

Make it executable with

chmod +x /etc/profile.d/java.sh

From now on, both variables will be set in all newly opened shells or terminals.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > edit $PATH variable


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway