Posted by: seesameer on: August 22, 2008
Its very difficult for window user to work on Linux.
For developing any application we need to set so many
environment variables,classpath variables and path.
Its easy for window users as it gives so many options
for setting environment variables.
For Linux its tedious while setting any environment variable
(i tried 100 times..).
Here is a trick…
Please back up all files before u try something…(caution)
only superuser can change settings.
( Do It with some editor.. or open in terminal (vi editor))
go to root folder
/root
then edit bash_profile…( a hidden file)
(Linux versions differ in flavors..so be careful)
bash_profile which is hidden file and superuser accessible.
this file contains (initially) path variable
something like path=/usr/…
after path variable press enter
and type whatever you want to set..
For ex:
CATALINA_HOME=/usr/local/tomcat
JAVA_HOME=/usr/local/jdk6
JBOSS_HOME=/usr/local/JBOSS4.2.2GA
JRE_HOME=/usr/local/JRE6
or if u want to set PATH variable.
after Path=/( some long list of path separated by : ) : /usr/local/jdk6/bin:/usr/local/JRE6/bin
by setting like this eclipse can search in path…
after saving bash profile…
type set in terminal and then check ( all environment variables will be there)
otherwise type in terminal (check the environment variable u wish to check..)
#echo $JAVA_HOME
/usr/local/jdk6
#_