[精讚] [會員登入]
793

在IDEA從JDK8升級到JDK11遇到的奇怪問題

在IDEA遇到的JAVA11函式庫引入問題

分享此文連結 //n.sfs.tw/14687

分享連結 在IDEA從JDK8升級到JDK11遇到的奇怪問題@外行中的外行
(文章歡迎轉載,務必尊重版權註明連結來源)
2020-08-04 14:57:47 最後編修
2020-07-19 14:29:02 By jung
 

這幾天發生了一件怪事,這是之前可能沒仔細處理也沒發現的問題

在IDEA 2019.3.4 &2019.3.5版本

把project sdk從oracle jdk8升級到AdoptOpenjdk11後出現的問題

就是在專案程式中:java.io.IOException 無法引入的狀況

依照IDEA指示選擇sdk回復為1.8版就正常

但也會把project sdk降版回 1.8

選擇自己安裝的openjdk11目錄作為sdk目錄也是失敗

除非直接用IDEA內建的jdk11版本

真的很奇怪

目前設定如下圖

差別在sdk 11.0.6 是IDEA內建的 jdk

路徑:/Users/edward/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/193.7288.26/IntelliJ IDEA.app/Contents/jbr/Contents/Home

而openjdk11版號相同都是11.0.6

但是路徑是自己裝的,IDEA也有找到,所以才會出現在project settings

/Users/edward/jdk11/Contents/Home

卻是出現錯誤

目前找不到原因@@

----------已解決

後來發現,原本安裝的jdk11目錄不知原因失去存取權限,只好重新解壓縮jdk11的程式

並乖乖的放到/Library/Java/JavaVirtualMachines/目錄下,就沒事了

 

 

END

你可能感興趣的文章

unknown issue after downgrade to intellij idea community version 使用社群版遇到的奇怪問題

使用virtualbox每次都忘記的事情 share folder from win host to linux guest vm

安裝netbeans9遇到的小狀況 how to show netbeans9 program onto ubuntu desktop

如何用git log功能產生有固定格式的commit紀錄 how to create a git commit history log file with custom format

在intellij IDEA解決檔案內容顯示為UTF-8字碼而不是中文的問題 how to show correct language content of file, instead of utf-8 encoded charactors

using google Appscript to send messages through LINE NOTIFY 使用google app script傳送LINE NOTIFY

隨機好文

JIRA using gmail as smtp outgoing mail sender 如何設定jira使用gmail信箱送信

centos7 apache ssl.conf設定狀況 在apache更新或重啟後可能遇到ssl.conf衝突問題

安裝netbeans9遇到的小狀況 how to show netbeans9 program onto ubuntu desktop

在apache http server停用TLS 1.0/1.1 and SSL 2.0/3.0 How to disable outdated versions of SSL/TLS on Apache

determine strings that include numbers and spaces differ from Highest and Lowest numbers inside strings that includes spaces