English

Intellij Error: Could not find or load main class

This tutorial will show how to quickly fix the Intellij Error: Could not find or load main class when running the main method of a class.

Intellij Error: Could not find or load main class com.bgasparotto.learningscala.scala.util.TryExamples

Process finished with exit code 1

Invalidate Caches and Restart

On Intellij, click on File -> Invalidate Caches / Restart as shown in the picture:

Then confirm on the next screen by clicking on Invalidate and Restart:

Feel free to add on the comments any other solution you may find.

Hope this helps. See ya!

bgasparotto

Recent Posts

Python function decorator

This guide will show you how to create a Python function decorator with a few…

2 years ago

Got permission denied while trying to connect to the Docker daemon socket

This guide will show you how to fix the error Got permission denied while trying…

2 years ago

Python virtual environment on Intellij IDEA

This guide will show you how to create a Python virtual environment on Intellij IDEA…

2 years ago

Find and kill processes on Linux and Mac by port number

This tutorial will quickly show you how to to find and kill processes on Linux,…

2 years ago

Python: Relocation R_X86_64_PC32 against symbol can not be used when making a shared object Error

This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…

2 years ago

Kubernetes useful commands

I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this…

2 years ago