1.問題描述
intellij運行java代碼時,提示如下問題
objc[xxx]: Class JavaLaunchHelper is implemented in both xxx and xxx. One of the two will be used. Which one is undefined.
2.問題解決
問題描述得比較清楚了,是系統中現在有兩個JDK,intellij不知道選擇哪個。所以重新配置一下就好
2.1 打開idea.properties文件
點擊help -> edit custom properties。如果系統中沒有該文件,IDE會提示你是否創建該文件。
2.2 修改文件
在文件後面添加一行
idea.no.launcher=true
2.3 重啓IDE
重啓IDE即可。