on 02-03-2009 5:26 PM
hi all,
I am a new user in our sap environment in solaris boxes. we use WRQ Reflection to run the X-Windows for using Java tools like Visual Administrator.
Since my profile is new,the environment variable JAVA_HOME for my user profile is not set.
The default shell is bash.but i dont know how to set the enviroment variable to start the java tools.
Please help me where can i find the .bash_profile and how to set it..( i can execute unix commands, but i am not an expert )
Help would be greatly appreciated and rewarded.
Thank you all for your time.
Addy
moved to the Unix forum, as this question is not Linux related
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Profiles are always in your home directory.
Logon as root
vi .bash_profile
then press "SHIFT" "G"
enter
export JAVA_HOME=<yourpathtojava>
- press "ESC"
- enter ":x"
logoff - and logon as root.
Then check with
echo $JAVA_HOME
if the path is set.
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Markus,
Thanks for your quick reply.
I couldn't find the .bash_profile in either /home OR /home/<my_user_id>
instead i see .bash_history file under /home/<my_user_id>
i cannot login as root.but i think i have the permissions to edit and modify files ( i could do with other files ) how do i check my own permission ?
Can i do it on my own if i have the necessary permission or i need unix admins help ?
Please help..simple thing..but eating my brain for 2 days..!
Appreciate your time.
Addy
I don't know the root password to switch the user ( su ).
Is this mandatory to have root permissions to set the environment variable ?
Can i do it with you guys help or I need to request solaris admins help as i may not have necessary permissions. since i am able to edit and modify other files, i think i should be able to do it.
Please help..
Addy
su - root means
"S witch User"
the "dash" means that the environment from the new user should be taken
the second argument is the username
Bash is not a default shell on Solaris so it won´t use the normal enviornment.
Create a new file with the name
.profile
in your users home directory and set
export JAVA_HOME=<yourpath>
Markus
Markus,
I found the jdk path - /usr/jdk/j2sdk1.4.2_12
And tried to export the JAVA_HOME and Ofcourse it works..Thanks !
i was able to start the application..but its only for the current session.
( I used export JAVA_HOME=/usr/jdk/j2sdk1.4.2_12 which is my jdk location )
But, when i tried to see .profile or .bash_profile to make it permenant, none is found.
I tried to create a .profile as you said..but when i tried to save the file after putting export command in there, i am not able to save,getting an error " Operation not applicable "
Is that because i don't have enough permissions ? How do i check my own Permissions ?
Please help...
Addy
> I tried to create a .profile as you said..but when i tried to save the file after putting export command in there, i am not able to save,getting an error " Operation not applicable "
I suggest you contact your Unix admins. Usually a user should be able to write/create files in his home directory.
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.