Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-06-2004, 10:54 PM   #1
LQ Newbie
Registered: Nov 2004
Distribution: Red Hat 9
Posts: 1

Rep: Reputation: 0
locating and edition .profile for java paths

im having problems setting up paths and classpaths for the jdk (java devopment kit for those who dont know) and any external classes (such as SavitchIn <- external class file whcih allows n00bies to take input from the user without manually configuring the IOStrings....)

anywho... i know that i need to do the following for setting up of the java paths/classpaths:
export JAVA_HOME=/usr/java/jdk1.5.0
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:$JAVA_HOME/externalclass:.
plz correct me if its wrong...
anywho, when i do it @ the terminal, it works like a charm... including the external SavitchIn.class

the problem is that i do not know how to make the env changes permanent...
when i reboot my *nix box, the env settings reset to the defaults...

i have read from other sites that u need to change the .profile file located in the user's home, but i cannot find it there... please can someone walk me throught how to do this...

or at the very least, provide me with a link to a working webpage with instructions?


Matthew Daize
Old 11-07-2004, 12:41 AM   #2
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Simply add the lines you have posted above to either one of ~/.profile, ~/.bash_profile or ~/.bashrc.

These files are hidden (The dot means they are hidden) but may not exist, you can list all files a directory using "ls -a". If they dont exist, simply create one of them using any text editor.

When you have made the changes, use the command "source .profile" (assuming you are using .profile). You should now see the changes reflected when you enter the command "printenv". Now the changes will be made each time you log in.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
locating java install on FC3 eagle63 Linux - Newbie 1 09-18-2005 08:09 AM
Which edition of JAVA to use? usernameddr Mandriva 1 01-21-2005 06:51 PM
relative/absolute paths in Java djgerbavore Programming 2 10-26-2004 09:01 PM
How do you set up links or paths in LINUX? Mandrake 9.2 Java VM Ygarl Linux - Newbie 4 03-29-2004 04:00 PM
question on paths and profile files bignester Linux - General 3 08-07-2003 03:54 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:34 PM.

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