error: Could not find or load main class Scala Spark in intellij

Parmanand
Oct 24, 2020

We all get this error very often while working with Scala & spark. There could be several reason for this error. But if you are sure that you have installed all required plugins or dependencies with correct version. And still getting this error.Then this article is for you.

Let’s get started !

Open File->New Project Settings -> Structure for new projects (Mac )

Make sure you select available SDK from the dropdown list. Now click on SDKs, here you should see only one version of java installed remove other versions if you see.

last thing to check, you should see at least one Scala version. If you don’t then click on + button to downlaod or add any Scala version.

Note: If you see multiple versions of Scala remove all except one.

Most important thing, don’t forget to restart your intellij IDE after making above changes .

Thanks for reading!

Please do share the article, if you liked it. Any comments or suggestions are welcome.

--

--