Pack
Package file:
File-->>ProjectStructure -->Click Artificats-->>Click the green plus sign-->Click JAR-->>Select From module with dependices
Click Output Layout to see if there is no third-party jar package, because you use the spark cluster environment, so you don't need a third-party jar package
重新build:
Build-->>Build Artifcat ..--->>build 或者rebuild
Submit to run
./bin/spark-submit --class "sparkStreaming.workCount" --master local[4] /usr/local/spark_jar/wordCount.jar
After --class is the main function when you package it
Finally, the location where you put the jar package, this location can be any location