|
|
为了装java所以要修改环境变量
我的java 安装在/usr/java/jdk1.5.0_07
之后我设置环境变量PATH
以下是/etc/profile的内容
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
fi
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
PATH=$PATH:/usr/java/jdk1.5.0_07/bin
JAVA_HOME=/usr/java/jdk1.5.0_07
export JAVA_HOME
export PATH
umask 022
但是重启之后输入java依旧command not found 这是为什么? |
|