之前一直用ubuntu 自带的jdk,现在重装了一下ubuntu,用了自己下载的jdk7
配置方法如下
vim /etc/profile
JAVA_HOME=/home/xxhong/tools/jdk1.7.0_13
PATH=$PATH:$JAVA_HOME/bin:/home/xxhong/tools/eclipse:/home/xxhong/tools/adt-bundle-linux-x86/sdk/platform-tools
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
重启 ok