LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-07-2007, 05:21 AM   #1
surender
LQ Newbie
 
Registered: May 2007
Posts: 3

Rep: Reputation: 0
linux environmental variable


hi all
i am new to linux fedora core-5
i have installed jdk1.5.0_06 in /usr/java/ directory
and set the environment variable JAVA_HOME=/usr/java/jdk1.5.0_06
and PATH=/usr/java/jdk1.5.0_06/bin
but once i exit the shell the environmental variables also get fly away
on re-envoking the shell i am not able to compile java program
please help me
 
Old 05-07-2007, 05:27 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You need to add these to your local environment file (~/.profile or ~/.bash_profile).

You can just add the following lines at the end of either of the 2 files:
export JAVA_HOME=/usr/java/jdk1.5.0_06
and
export PATH=$PATH:/usr/java/jdk1.5.0_06/bin

If you want everybody (global) to have access, add the lines to the bottom of /etc/profile.

Hope this helps.
 
Old 05-07-2007, 07:54 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
$HOME environmental variable missing a / mattn Linux - Newbie 3 02-17-2007 07:31 AM
Is it possible to locate where an environmental variable is exported from? laggerific Linux - Software 2 12-07-2006 12:55 PM
Setting an environmental variable maevious Linux - Newbie 6 11-24-2005 04:15 PM
nohup tcsh (environmental variable) podollb Linux - Software 0 05-17-2004 05:44 PM
how to get environmental variable from JAVA program edreddy Programming 2 07-29-2002 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration