我为类路径设置了一个环境变量:
~/spark-0.8.0-incubating-bin-hadoop1 >echo $CP
:/home/sboesch/spark-0.8.0-incubating-bin-hadoop1/conf:/home/sboesch/spark-0.8.0-incubating-bin-hadoop1/assembly/target/scala-2.9.3/spark-
但是,对于repl中的System.getProperty,这是不可见的:
~/spark-0.8.0-incubating-bin-hadoop1 >scala -classpath $CP
Welcome to Scala version 2.9.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_23).
Type in expressions to have them evaluated.
Type :help for more information.
scala> System.getProperty("java.class.path")
res0: java.lang.String = .