IDEA 启动报错could not find main class com/intellij/idea/main解决办法

1.现象:

安装完首次打开 intellij 出现 could not find main class com/intellij/idea/main?

2:解决办法

You should create IDEA_JDK_64 environment variable and set its value to JDK8 instance location on your computer. 
This JDK8 instance can be used only for idea and JAVA_HOME can point to the Java 7 at the same time without any problems. 
Via documentation: 
idea64.exe uses this JDK search sequence: 
IDEA_JDK_64 environment variable 
..\jre64 directory 
system Registry 
JDK_HOME environment variable 
JAVA_HOME environment variable 
JAVA_HOME can point to the Java 7 at the same time with no problems.

这是英文文档里的内容,大致意思是说,你可以在环境变量中创建一个叫做IDEA_JDK_64的配置,地位等同于java_home,idea会优先读取这个配置,如此一来,idea可以启动,具体项目用哪个版本进去之后再设置也ok,两不耽误

注意:加了IDEA_JDK_64之后,path变量里也要加,就是把之前的%java_home%复制一份,然后改成%IDEA_JDK_64%

亲测可用.

3:参考文献

对于idea的使用安装及其配置,可以参考极客学院的一系列文章(绝非打广告)

    http://wiki.jikexueyuan.com/project/intellij-idea-tutorial/introduce.html

关于破解方法可以参考:

https://www.cnblogs.com/zqr99/p/8708069.html 

猜你喜欢

转载自my.oschina.net/u/3406827/blog/1796885