View Full Version : Java Path
chadr6
November 6th, 2005, 05:56 PM
I just installed the Java SDK on Ubuntu 5.10 and I'm looking for a way to permanently set the path variable to include the java bin directory. I realize that I can do it each time I open the shell by typing PATH=$PATH:/directory, but I want to be able to set it permanently so that each time I open the shell it will just work. What file do I have to edit and where is it?
LordHunter317
November 6th, 2005, 06:10 PM
For your user, edit ~/.bashrc.
Globally, edit /etc/profile.
MakubeX
November 6th, 2005, 07:17 PM
In my setup, I had appended the PATH in file bash.bashrc (somewhere in /etc)..
jvictor
November 7th, 2005, 04:59 AM
You need to set in ~/.bashrc and export it
export JAVA_HOME=<blah_blah>
export CLASSPATH=<blah_blah>
export PATH=${JAVA_HOME}/bin:$PATH
ngms27
November 7th, 2005, 05:37 AM
You don't need to use EXPORT in .bashrc
simply PATH=MyJavaPath:$PATH is enough to make suns Java the default and everything work for that user.
JonnyT
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.