LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   locating and edition .profile for java paths (https://www.linuxquestions.org/questions/linux-newbie-8/locating-and-edition-profile-for-java-paths-251985/)

Madaize 11-06-2004 09:54 PM

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:
Code:

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?

thanks...

Matthew Daize
m_daize@yahoo.ca

IBall 11-06-2004 11:41 PM

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.

--Ian


All times are GMT -5. The time now is 06:09 AM.