linux下配置环境变量
1. 打开/etc/profile文件,加入以下代码:
#set java environment
JAVA_HOME=/ecp/software/jdk1.6.0_25
ANT_HOME=/usr/work/apache-ant-1.8.2
PATH=$JAVA_HOME/bin:$ANT_HOME/BIN:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
JBOSS_HOME=/ecp/software/jboss-4.2.3.GA
export JAVA_HOME PATH CLASSPATH JBOSS_HOME
2.执行source /etc/profile 命令,使环境变量生效。
这里设置的环境变量对系统下所有用户生效。
相关推荐
昭君出塞 2020-11-23
xiaoyuerp 2020-08-17
blankt 2020-08-15
Jieen 2020-06-18
IsanaYashiro 2020-05-28
lanyou00 2020-05-26
昭君出塞 2020-05-25
zhushixia 2020-05-20
pointfish 2020-05-19
Attend 2020-05-15
屿刃 2020-04-29
lfjjia 2020-05-07
xiaohouye 2020-05-06
playlinuxxx 2020-05-05
Sabrina 2020-05-03
libao 2020-09-16
zjc 2020-09-03
84226432 2020-08-19