cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Environment variables in suse linux 11 SP1

Former Member
0 Kudos

Hi gurus

I am new to SUSE LINUX 11 SP1, how to set java environment variables permanently for all users?

I cant find .bash_profile in root directory ...

Regards

Raju

Accepted Solutions (0)

Answers (4)

Answers (4)

v_veeramalla
Active Participant
0 Kudos

you can check .cshrc file in home directory of <sid>adm, and based on that you can find java required files ex:j2eeenv_`hostname`.csh

May be before that first check <sid>adm is using which shell based on that you check required files , normally sap system uses csh  , you can check same in /etc/passwd file also.

fabian_herschel
Participant
0 Kudos

The question was about system wide setting of environment variables - so .cshrc is not the correct place I guess.

v_veeramalla
Active Participant
Former Member
0 Kudos

take a look at the /etc/profile.d directory for a script setting your java environment and update this script or update the logical links to whicht your jdk and jre point

fabian_herschel
Participant
0 Kudos

In general this is the right point to set environment variables. However normally the JAVA environment variables should be set correctly by the java installation packages.

So which JAVA environment variables do you like to set explicitely?

Former Member
0 Kudos

Login to your account and open .bash_profile file

$ vi ~/.bash_profile

Set JAVA_HOME as follows using syntax export JAVA_HOME=<path-to-java>. If your path is set to /usr/java/jdk1.5.0_07/bin/java, set it as follows:

export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java

Set PATH as follows:

export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

Former Member
0 Kudos

Hi Arjun

i cant find the .bash_profile file in root directory..

Former Member
0 Kudos

Hi,

>> i cant find the .bash_profile file in root directory..

This is because a hidden file. List the hidden files with "ls -a" command.If it is not exist, create it.

Best regards,

Orkun Gedik

Former Member
0 Kudos

Additionally, you can search it by the command "find / -name .bash_profile"

Best regards,

Orkun Gedik

nicholas_chang
Active Contributor
0 Kudos

Hi,

Do u try command ls -lar ?

Btw, are u doing sap installation? If yes, u just need to export java_home as root and java_home will added to sidadm profile.

Cheers

Former Member
0 Kudos

Hi chang

I tried ls-lar but i cant find .bash_profile file in root directory to set the path...