I\'m having problems with a \"ClassNotFound\" Exception using this simple example:
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext.
What I figured out was if you have build your project without any warnings then you don't have to write extra code for master and other things. Although it is a good practice but you can just avoid it. Like here in my case there was no warnings in the project so I was able to run it without any extra code. Project Structure Link
In the case where I have some build related warnings there I have to take care of JAR paths, my URL and the master in code as well as while executing it.
I hope it may help someone. Cheers !