cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Environmental Variables for SAP Netweaver Java on VMWare

Former Member
0 Kudos

Hi All,

I am unable to start Visual administrator on SAP Netweaver 7.0 Java on Linux VMWare. Can anyone suggest me the steps for setting Environmental Variables "JAVA_HOME" on SUSE Linux VMWare.

Thanks,

Divya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

To add the JAVA_HOME profile to all users in SUSE Linux modify file /etc/profile and add the following line export JAVA_HOME=<path-to-java>. Log off then back on for the setting to take effect.

Regards,

Jared

Former Member
0 Kudos

Hi Jared,

Can you please elaborate the steps.

when i tried using

vi /etc/profile.

I added these 2 lines

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

export PATH=$JAVA_HOME/bin:$PATH

Now when i use the command - echo $JAVA_HOME , it is showing the output. Next time when i open the terminal it is empty.

But how shall i save the file. When i close and open it again, those 2 lines are not saved. As referred to the docs, i couldnt find any lines called as unmask 022.

Is there any other thing to be done. But how shall i edit and save the file /etc/profile.

Could you please elaborate me on these steps. I am new to linux os.

Thanks,

Divya

Former Member
0 Kudos

To save a file that you have edited in vi you will need to:

Edit the file with the entries that you want

Exit edit mode in vi (normally just hit escape)

Enter the command :wq! (you will see this in the bottom left corner of the screen)

Now when you open /etc/profile again the changes should be there.

Thanks,

Jared

Former Member
0 Kudos

Thanks Jared for the help!

Let me try this and will get back.

Thanks,

Divya

Former Member
0 Kudos

Hi Jared,

i entered the command

vi /etc/profile

I wrote the export code at the end of the profile. when i press escape nothing is happened. I manually wrote the command

.wq!

and closed the terminal and opened it again. Still the same, changes not reflecting. Is my command to open the profile in eddit mode correct.

Next time when i use the command, vi /etc/profile

it gives me a page saying

//////////////////////////Code Starts////////////////////////////

E325: ATTENTION

Found a swap file by the name "/etc/.profile.swp"

owned by: root dated: Tue Mar 22 14:05:56 2011

file name: /etc/profile

modified: YES

user name: root host name: ivml2005

process ID: 15497

While opening file "/etc/profile"

dated: Tue Oct 2 05:52:28 2007

(1) Another program may be editing the same file.

If this is the case, be careful not to end up with two

different instances of the same file when making changes.

Quit, or continue with caution.

(2) An edit session for this file crashed.

If this is the case, use ":recover" or "vim -r /etc/profile"

to recover the changes (see ":help recovery").

If you did this already, delete the swap file "/etc/.profile.swp"

to avoid this message.

Swap file "/etc/.profile.swp" already exists!

[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it:

////////////////////////Code ends////////////////////////////////////////////

Where am i wrong. how can i edit and save the variables correctly. Please do help.

Thanks,

Divya

Former Member
0 Kudos

In order for the changes to take effect you must logoff with that user and log back in. Can you try this?

Former Member
0 Kudos

Hi Jared,

I tried that. Still the same.

Why is that when i press the escape button, it is not showing that wq command. on click of escape no effect. nothing is happening.

How else shall i acheive this.?

Please help!

Thanks,

Divya

Former Member
0 Kudos

I am not sure. I have pretty much exhausted my experience of vi. You may try getting help in SUSE or a google search on the vi editor and see if you can find any more info.

Jared

Former Member
0 Kudos

Hi,

These commands got saved in /etc/profile

export JAVA_HOME=/usr/java/j2sdk1.4.2_09/jre

export PATH=$JAVA_HOME/bin:$PATH

Referred this doc - for saving

http://lowfatlinux.com/linux-editor-vi.html

But after coming out

when i use the command

echo $JAVA_HOME,

it is not showing any ouput.

Is my export commands right?? Also is there any specific place where i should place this export commands?

///////////////////////////////Profile starts//////////////////////

#ESCDELAY=2000

#export ESCDELAY

export JAVA_HOME=/usr/java/j2sdk1.4.2_09/jre

export PATH=$JAVA_HOME/bin:$PATH

#

  1. The user file-creation mask

#

umask 022

#

  1. Setup for gzip and (t)csh users

#

if test -z "$PROFILEREAD" ; then

  1. GZIP=-9

  1. export GZIP

CSHEDIT=emacs

export CSHEDIT

fi

Type :quit<Enter> to exit Vim

/////////////////////////////profile ends//////////////////////////////

Thanks,

Divya

Former Member
0 Kudos

Thanks jared. problem solved.

Thanks,

Divya

Answers (0)