在Linux下,vi/etc/profile
# /etc/profile
export HADOOP_HOME_WARN_SUPPRESS=1
export JAVA_HOME=/usr/local/jdk export HADOOP_HOME=/usr/local/hadoop export ZOOKEEPER_HOME=/usr/local/zk export JRE_HOME=/usr/local/jdk/jre export SOURCEPATH=".:/usr/code:$SOURCEPATH" export CLASSPATH=".:$JAVA_HOME/lib:$JRE_HOME/lib:$ZOOKEEPER_HOME/*:$ZOOKEEPER_HOME/lib/*:$ZOOKEEPER_HOME/conf:/usr/code:$CLASSPATH" export PATH=".:$HADOOP_HOME/bin:$ZOOKEEPER_HOME/bin:$ZOOKEEPER_HOME/conf:$JAVA_HOME/bin:$PATH"
已经配置了SOURCEPATH环境变量,而且我已经吧“a.java”文件存放到了/usr/code下,为什么在其他目录下javac a.java 提示找不到,我配置错了吗,该怎么配置?(classpath生效了)