pony

抄袭是一种美德

UBUNTU 下 java环境变量配置

profile 或environment配置其中一个就可以
profile:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:/usr/lib/jvm/java-6-sun/bin
export CLASSPATH=./:/usr/lib/jvm/java-6-sun/lib/tools.jar:/usr/lib/jvm/java-6-sun/lib/dt.jar:/usr/lib/jvm/java-6-sun/lib/rt.jar:/usr/lib/jvm/java-6-sun/lib
umask 022
 
 
environment:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"
CLASSPATH=./:/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun
 
 
 
配置修改java的运行的环境

 sudo update-alternatives --config java

posted on 2008-03-09 12:26  马森  阅读(1965)  评论(0编辑  收藏  举报

导航