Intellij launch error: Could not find main class com/intellij/idea/Main

6.6k views Asked by At

Intellij launch error in a Windows Environment.

When launching from the "Start Menu" getting a popup window with the following error:

Could not find main class com/intellij/idea/Main

Seems like a possible classpath issue. Can anyone recommend a quick fix, maybe in one of properties files?

3

There are 3 answers

0
Monseur Seye On BEST ANSWER

For PyCharm, this worked:

  • Uninstall PyCharm
  • Download and install JDK 8
  • Set your system variables
  • Reinstall PyCharm
0
Yogesh Ukale On

For me its resolved for IntellijIdea version 22, i was getting below error when i changed IntelliJ Default JRE to JRE 17 enter image description here

Just we need to remove "idea64.exe.jdk" for me this location is "C:\Users{UserName}\AppData\Roaming\JetBrains\IdeaIC2022.1\idea64.exe.jdk".

0
Nabanita Dasgupta On

I was getting this error with jdk version 17, but when I switched to jdk version 11 the error was resolved.

Also set the system environment variable to your system's jdk location:

JAVA_HOME = C:\Program Files\Java\jdk-11.0.11