For "./bin/spark-submit --class org.sparkexample.WordCount --master local[2] /<path to maven project>/target/spark-examples-1.0-SNAPSHOT.jar /<path to a demo test file> /<path to output directory>" The class name should be WordCountTask now. And also, I don't see any output result in output directory, only console.