# Be sure to set environment variables to root

**URL:** <https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778>\
**Category:** SLES Configure-Administer\
**Created:** [June 23, 2014, 6:08am UTC](https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778 "2014-06-23T06:08:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanidm](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@fanidm](https://forums.suse.com/u/fanidm)\
**Post date:** [June 23, 2014, 6:08am UTC](https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778/1 "2014-06-23T06:08:55Z")

</div>

Hi friends,  
As I can set starting the java environment to the user root. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 23, 2014, 7:03am UTC](https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778/2 "2014-06-23T07:03:22Z")

</div>

> [@](#):
>
> On Mon 23 Jun 2014 03:14:01 AM CDT, fanidm wrote:
> 
> Hi friends,  
> As I can set starting the java environment to the user root. Thanks for  
> your help.

Hi  
If you install java from the SLE repos it will set the environment  
variables, for example on my 64bit system;

```auto
# env |grep JAVA
JAVA_BINDIR=/usr/lib64/jvm/java/bin
JAVA_HOME=/usr/lib64/jvm/java
JAVA_ROOT=/usr/lib64/jvm/java
```

–  
Cheers Malcolm Â°Â¿Â° SUSE Knowledge Partner (Linux Counter #276890)  
openSUSE 13.1 (Bottle) (x86\_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!

---

<div class="post-metadata">

**Author:** ![fanidm](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@fanidm](https://forums.suse.com/u/fanidm)\
**Post date:** [June 23, 2014, 7:19am UTC](https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778/3 "2014-06-23T07:19:21Z")

</div>

Hello friend,  
In that file I can add these references to the root user and other users of the operating system. thanks

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 23, 2014, 7:53am UTC](https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778/4 "2014-06-23T07:53:24Z")

</div>

> [@](#):
>
> On Mon 23 Jun 2014 04:24:01 AM CDT, fanidm wrote:
> 
> Hello friend,  
> In that file I can add these references to the root user and other users  
> of the operating system. thanks

Hi  
You can add the variables into a users home directory in the .profile  
and export;

```auto
export JAVA_BINDIR=/usr/lib64/jvm/java/bin
export JAVA_HOME=/usr/lib64/jvm/java
export JAVA_ROOT=/usr/lib64/jvm/java
```

Adjust paths as required to your java install.

–  
Cheers Malcolm Â°Â¿Â° SUSE Knowledge Partner (Linux Counter #276890)  
openSUSE 13.1 (Bottle) (x86\_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!

---

<div class="post-metadata">

**Author:** ![fanidm](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@fanidm](https://forums.suse.com/u/fanidm)\
**Post date:** [June 23, 2014, 8:01am UTC](https://forums.suse.com/t/be-sure-to-set-environment-variables-to-root/25778/5 "2014-06-23T08:01:03Z")

</div>

Friend,  
Thanks.
