[精讚] [會員登入]
893

在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

你可能感興趣的文章

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

specific instructions to create a maven archetype from local existing project. Generate an archetype from the project

openssl package update issue caused by cve-2022-2068 centos7 is at maintenance support phase2, only critical impact security issues will be patched

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

使用letsEncrypt替換docker容器內的nginx https憑證 using cerbot for nginx on oracle linux 9

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

隨機好文

bitbucket repository control application setup 安裝完bitbucket服務後,須設定bitbucket.properties

在windows server建立radius服務使用active directory帳號驗證 setup windows server to add radius service using active directory accounts for authentication

proxmox5.x using duplicati as cloud backup strategy install duplicati program on Proxmox host for remote backup using google drive account

在ubuntu18.04桌面版安裝中文注音輸入法 如何在ubuntu桌面使用新酷音注音輸入法

how to add physical disks into HP smart array through esxi interface 如何在磁碟陣列卡上加入新的硬碟-未完待續