Error “ClassNotFoundException” in IntelliJ IDEA

Probably your project structure was src/main/java/start.java but when you added it to IntelliJ you have set src as a source folder, so IntelliJ put main.java as a package.

In Project Setting (Ctrl+Shift+Alt+S) → Modules → Sources tab set src/main/java as Source Folder. Then in your simple program change package to whatever you like (e.g. my.test). After that if IntelliJ reports any error in line with package quick fix with Alt+Enter should help

Leave a Comment