LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2011, 11:37 PM   #1
kazeopeia
LQ Newbie
 
Registered: Sep 2011
Posts: 10

Rep: Reputation: Disabled
Question Set up DOMAIN_HOME environment variable in SUSE Linux


Hi all,

I am running Java NetBeans 6.9 jdk 6 on SUSE Linux (a newbie on linux) and I currently need to get the path of the weblogic domain of my Java application.
I have read that I can directly access the environment variable by using this :

System.getenv("DOMAIN_HOME")

The problem is I couldn't find the DOMAIN_HOME environment variable (actually I have no idea on setting up the env. variable in linux). I found instructions on the internet telling me that I could set this up by setting :

Export DOMAIN_HOME = /desired_path_to_domain

Following several instructions found on the internet, I have already tried the following resolutions :

1. I wrote this on my home's .profile
#export DOMAIN_HOME=$DOMAIN_HOME:/path_to_domain
2. I also wrote that on my home's .bashrc and on /etc/bash.bashrc
3. I executed this on the konsole
printenv
... and as expected I saw the list of all the environment variables. At first, I thought it was pointed to .profile but it wasn't. It was displaying an entirely different value from what was defined on .profile when I executed the line
echo #PATH
... so I concluded that my environment variables weren't defined on .profile

The question is, where exactly is that printenv (environment variables) defined and how can I modify it to include my DOMAIN_HOME variable. Guys, I really need this. I came up posting on forums because none of the solutions above or anywhere else could solve my problem. DOMAIN_HOME remains null (even after restarting my linux server)

Thank you very much for any quick and kind response.
Please help. Thanks.
 
Old 09-13-2011, 05:24 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Lightbulb



Open your /home/Name/.bashrc file via any text editor you choose. You will have to open as root.


Open Terminal

enter su -

enter root password

vi / nano /gedit : Which ever text editor you perfer. /home/Your_Name/.bashrc

enter "DOMAIN_HOME = /desired_path_to_domain" on it's own line

save file.
 
Old 09-14-2011, 07:06 AM   #3
kazeopeia
LQ Newbie
 
Registered: Sep 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
It just worked! Thank you so much!..
/home/Name/.profile worked for me...
 
Old 09-15-2011, 05:02 AM   #4
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Great !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variable being set twice Mechanic Slackware 12 08-03-2010 04:22 AM
set environment variable Jongi Linux - Newbie 7 03-01-2004 05:34 AM
How to set a environment variable in rh? yenonn Linux - Newbie 11 02-21-2003 11:24 PM
how do you set the environment variable CC? mr.moto Linux - General 0 12-17-2001 10:17 PM


All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration