javac 编译
linux平台下:javac -cp ./hadoop-common-2.7.1.jar:./hadoop-mapreduce-client-core-2.7.4.jar: WordCount.java
window 需要把上面的: 换成;
执行jar里面的class
java -cp ./BaseTecLearn-1.0-SNAPSHOT-jar-with-dependencies.jar: top.letsgogo.WordCount /usr/panteng/regular.txt /usr/panteng/110
默认JDK1.7 切换1.8
alias java8='export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_121/;export PATH=$JAVA_HOME/bin:$PATH;export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar'
执行 java8 即可