1. Permanent modification, valid for all users # vi /etc/profile //Press [Shift + g] on the keyboard and add the following content at the end of the profile file: JAVA_HOME=/usr/local/java/jdk1.7.0_25 JRE_HOME=$JAVA_HOME/jre CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar PATH=$JAVA_HOME/bin:$PATH export PATH JAVA_HOME JRE_HOME CLASSPATH or export JAVA_HOME = /home/myuser/jdk1.7.0_03 export PATH = $JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar #oracle related variables export ORACLE_SID=orcl export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib export PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/sbin:/usr /local/bin:/usr/X11R6/bin export PATH=$ORACLE_HOME/bin:$PATH:/sbin/ [Note]: If you want the modification to take effect immediately, you must run 2. Permanent modification, valid for a single user //Modify the .bash_profile file in the user directory $ vi /home/myuser/.bash_profile //Add the following content at the end of the file export JAVA_HOME = /home/myuser/jdk1.7.0_03 export PATH = $JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar [Note]: If you want the modification to take effect immediately, you must also run 3. Only valid for the current bash/shell $ export JAVA_HOME = /home/myuser/jdk1.7.0_03 $ export PATH = $JAVA_HOME/bin:$PATH $ export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar This is the end of this article about how to modify/set the environment variable JAVA_HOME under Linux. For more information about how to modify/set the environment variable JAVA_HOME under Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL statement execution order and writing order example analysis
>>: About WeChat Mini Program to implement cloud payment
This article mainly introduces the wonderful use ...
This article shares the specific code of Vue+echa...
When the jsp that is jumped to after the struts2 a...
Table of contents ReactHooks Preface WhyHooks? Fo...
Today I would like to share with you the CSS3 tra...
Article Structure 1. Preparation 2. Install Java ...
Preface As you know, Linux supports many file sys...
Table of contents Preface 1. Use for...of to iter...
CJK is the abbreviation of CJK Unified Ideographs...
As shown below: Yesterday: UNIX_TIMESTAMP(CAST(SY...
Understand this Perhaps you have seen this in oth...
1. Introduction Why do we need indexes? In genera...
Table of contents Skeleton screen use Vue archite...
This article example shares the specific code of ...
This article shares the specific code of js to im...