Main not found error after update on Mac
Answered
So I updated to the latest release (Not EAP!) of IntellIJ on my macbook pro and now I can't create new projects without getting a ClassNotFound Exception on main.
If i try to run older projects they work without a problem.
Any solutions to this problem?
Please sign in to leave a comment.
How do you build and run the project? Do you use maven/gradle? Please provide screenshots showing the problem in a full IDE window, including Project and Run(Debug) tool windows, complete error text and IDE logs zipped after IDE restart and reproducing (Help | Collect Logs and Diagnostic Data action). Thank you.
For uploading you can use https://uploads.jetbrains.com or any file sharing service.
I'm using IntelIJ as a college student, using nothing more than the base java, and suddenly not even the base template works (I tried it in case I was doing something wrong with the build settings).
Here is the link with everything.
Upload id: 2021_02_15_2brGH6GYK9amTrFb (files: idea-logs-20210215-151711.zip and 2 more)
Does Build | Rebuild Project action help before you launch the configuration?
Can you attach screenshots of the Run Configuration dialog and screenshot with the Main class visible in the project tool window?
By the way if you create a new command Java project from scratch (not using a template) - does it work?
Please try also using different JDK version for a project: https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk
Build | Rebuild does nothing.
Creating one from scratch gives the same error.
I tried with jdk 13 and 11, still doesn't work.
Here is the screenshot.
Upload id: 2021_02_15_EH4CUrDav3YCAceM (file: Captura de ecrã 2021-02-15, às 17.37.19.png)
I've tried to reinstall IntellIJ but it didn't do anything.
>Build | Rebuild does nothing.
What exactly happens - do you see that the build completes successfully? Do you see the Main.class file in the module's compiler output directory?
Have you tried creating a project under a simple path, not containing spaces or colon? If not, please try.
Thank you very much!! Apparently it was the folder path that was causing trouble, I changed to a simple folder and I was able run everything just fine.
Thank you for the information.