ubuntu中不用通过命令行启动IntelliJ IDEA

误删了home中的配置文件,发现在ubuntu中安装了IntelliJ IDEA后发现只能通过命令行启动,通过图标启动一直提示找不到 jdk

错误如下

'tools.jar' seems to be not in IDEA classpath.
Please ensure JAVA_HOME points to JDK rather than JRE

 

只需要修改 /usr/share/applications/jetbrains-idea.desktop

把其中的

Exec="/opt/idea-IU-143.1184.17/bin/idea.sh" %f

改为

Exec=env JAVA_HOME=/opt/jdk1.8.0_65  "/opt/idea-IU-143.1184.17/bin/idea.sh" %f

其实是添加了java_home配置,这样启动时就不会报找不到jdk了

 

 

 

转载自:https://blog.csdn.net/tsvico/article/details/81204404

posted @ 2018-08-25 20:54  banlucainiao  阅读(40)  评论(0)    收藏  举报