This is what you you should do if you want to use a shell script to set your environment variable.
1. Create a .sh file ex: setEnv.sh
2. Edit and add like below:
#!/bin/sh
#*****************************************************************************
# This script is used to set up your environment for development with WebLogic
# Server. It sets the following variables:
#
# JAVA_HOME - Location of the version of Java
# ANT_HOME - Location of the version of ANT
#*****************************************************************************
JAVA_HOME="/jdk/jdk1.8.0_131"
ANT_HOME="/oracle_common/modules/org.apache.ant_1.9.2"
export JAVA_HOME ANT_HOME
echo "Your environment has been set."
3. Edit paths based on you machine/environment.
4. Save
5. Execute the script using the command . ./setEnv.sh
6. Validate by executing the command echo $JAVA_HOME
You can add other variables as required.
Helpful? Please comment.
Happy Learning!!
1. Create a .sh file ex: setEnv.sh
2. Edit and add like below:
#!/bin/sh
#*****************************************************************************
# This script is used to set up your environment for development with WebLogic
# Server. It sets the following variables:
#
# JAVA_HOME - Location of the version of Java
# ANT_HOME - Location of the version of ANT
#*****************************************************************************
JAVA_HOME="/jdk/jdk1.8.0_131"
ANT_HOME="/oracle_common/modules/org.apache.ant_1.9.2"
export JAVA_HOME ANT_HOME
echo "Your environment has been set."
3. Edit paths based on you machine/environment.
4. Save
5. Execute the script using the command . ./setEnv.sh
6. Validate by executing the command echo $JAVA_HOME
You can add other variables as required.
Helpful? Please comment.
Happy Learning!!
No comments:
Post a Comment