2021年1月24日

在WIN10使用mvn compile java 時找不到JDK

使用mvn compile JAVA project時出現以下錯誤訊息,但JDK已經安裝而且也在使用者PATH路徑下 

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error

 原因在WIN10下, 已將Oracle\Java\javapath變數加在"系統變數"下. 並非指到安裝的JDK. 
以連結的形式 指到子目錄javapath_target_149203015下的3個執行檔

解決方式:
在"系統變數"下新增JAVA_HOME並加入"系統變數"下的"PATH"即可




參考:




沒有留言:

coap-client 4.3.0 Windows build

coap-client  is a  wget -like tool to generate simple requests for retrieval and modification of resources on a remote server.  Got the sour...