現(xiàn)象
遇到idea不斷閃退,但是mac 的提示不詳細(xì)狠鸳。
查看日志:
打開(kāi)Mac的應(yīng)用程序 右鍵IntelliJ IDEA.app圖標(biāo)點(diǎn)擊顯示包含內(nèi)容
依次進(jìn)入Contents/MacOS目錄
3.雙擊idea
4.查看控制臺(tái)報(bào)錯(cuò)信息
但是控制臺(tái)的報(bào)錯(cuò)信息是java的錯(cuò)誤哈街,發(fā)現(xiàn)/用戶(hù)名/ 目錄下有個(gè)
java_error_in_idea_5629.log
打開(kāi)日志文件窗价。
日志
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (safepoint.cpp:712), pid=4680, tid=0x0000000000018113
# fatal error: Illegal threadstate encountered: 4
#
# JRE version: OpenJDK Runtime Environment (8.0_152-b19) (build 1.8.0_152-release-1248-b19)
# Java VM: OpenJDK 64-Bit Server VM (25.152-b19 mixed mode bsd-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
error stream of java
按照網(wǎng)上說(shuō)是JDK的問(wèn)題。
只要換個(gè)JDK安裝即可叹卷。
解決
給電腦安裝新的jdk。
如下文 :https://www.cnblogs.com/tanjiangtao/p/12953619.html
裝完后發(fā)現(xiàn)并沒(méi)有改變坪它。
發(fā)現(xiàn)啟動(dòng)的時(shí)候用戶(hù)的是OpenJDK 骤竹,但是我的IDEA 的項(xiàng)目設(shè)置已經(jīng)改了。
這個(gè)時(shí)候 網(wǎng)上找到這個(gè)文章:https://blog.csdn.net/kobeguang/article/details/108670481往毡。
換掉啟動(dòng)idea的jdk蒙揣。
官網(wǎng)介紹:https://www.jetbrains.com/help/idea/switching-boot-jdk.html
直接Help- find Action
輸入:switch Boot JDK
切換JDK成你安裝的新的jdk。 重啟IDEA开瞭。
問(wèn)題解決~
寫(xiě)完這個(gè)文章幫到你懒震。