Linux users overwrite the global (custom) variable environment

Source: Internet
Author: User
Linux users overwrite the global (custom) variable environment [dev_ydzj_1 @ localhostusr] $ cd $ HOME [dev_ydzj_1 @ localhost ~] $ Pwd/home/dev_ydzj_1 [dev_ydzj_1 @ localhost ~] $ Java-versionjavaversion & quot; 1.6.0 _ 24 & qu linux users overwrite the global (custom) variable environment [dev_ydzj_1 @ localhost usr] $ cd $ HOME [dev_ydzj_1 @ localhost ~] $ Pwd/home/dev_ydzj_1 [dev_ydzj_1 @ localhost ~] $ Java-version java version "1.6.0 _ 24" Java (TM) SE Runtime Environment (build 1.6.0 _ 24-b07) Java HotSpot (TM) Server VM (build 19.1-b02, mixed mode) www.2cto.com saw the above results in the company and thought that the global java environment of the linux system is 1.6, but I was confused when I saw the following execution results [dev_ydzj_1 @ localhost ~] $ Tail-3/etc/profile export JAVA_HOME =/opt/jdk/jdk1.5.0 _ 15 export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH: $ HOMR/bin to ask someone to answer the question. I was enlightened when I saw the following results! Www.2cto.com [dev_ydzj_1 @ localhost ~] $ Less. bash_profile #. bash_profile # Get the aliases and functions if [-f ~ /. Bashrc]; then .~ /. Bashrc fi # User specific environment and startup programs export TOMCAT_HOME =/home/dev_ydzj_1/apache-tomcat-5.5.25 export CATALINA_HOME =/home/examples/apache-tomcat-5.5.25 export JAVA_HOME =/opt /jdk/jdk1.6.0 _ 24 export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ atat_home/bin: $ CATALINA_HOME/bin: $ PATH: $ HOME/bin export PATH record, memo. Hey!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.