setting a path
i have just installed java jdk 1.5 on linux suse 9.1. the problem is that i am used to use the javac command to compile my java files and when i use it now i get an error stating that the javac command cannot be found.
a friend told me that he had a similar problem in windows and that he had to set a path to the java / bin directory. how can i do this in linux? please help!! regards |
Lotsa good info here:
Look for "Setting the PATH for Linux" http://anchorpointbooks.com/java/pathsetting.html KC |
You can set this in your .profile found in your home directory (it may be .bash_profile?)
(Unless you want it available to all users then you can set it in /etc/profile) There should be a variable called PATH, PATH=/usr/bin:/usr/local/bin:/usr/local/bin/jvm/java1.5/bin You should add you java path similar to above but point it to your java path, Don't forget to update your environment $source ~/.profile |
The command you'll want to use, so you don't overwrite your existing $PATH is this:
Code:
export PATH=$PATH:/usr/local/bin/jvm/java1.5/bin |
hey..all.. I know I am replying to this...after a long time....
But there's one thing.... There's no specific thing CALLED PATH in /etc/profile.... its a file with some code.... What I did is this.... first wrote these two sentences in /etc/profile Code:
PATH="$PATH:/usr/java/j2sdk1.4.2_08/bin:" Code:
source /etc/profile I hope this wud help ppl who wud search ...for this... |
All times are GMT -5. The time now is 07:08 PM. |