๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Trouble Shooting

./gradlew build(test) failed - Could not initialize class org.jetbrains.kotlin.com.intellij.util.io.FileChannelUtil ~

by ์ฃผ๋ฐœ2 2022. 4. 7.
๋ฐ˜์‘ํ˜•

๐Ÿ“Ž ./gradlew build(test) failed

 

IntelliJ์—์„œ gradle์„ ์‚ฌ์šฉํ•  ๋•Œ, ํ„ฐ๋ฏธ๋„์—์„œ ๋นŒ๋“œ ๋ฐ ํ…Œ์ŠคํŠธ ๋“ฑ์˜ Tasks๋ฅผ ์ง„ํ–‰ํ•  ๋•Œ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๋ฉด...

 

java.rmi.ServerError: Error occurred in server thread; nested exception is: 
        java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.util.io.
FileChannelUtil

ํ˜„์žฌ ํ”„๋กœ์ ํŠธ์˜ JDK ๋ฒ„์ „๊ณผ ์ปดํ“จํ„ฐ์˜ JDK ๋ฒ„์ „์„ ํ™•์ธํ•ด๋ณธ๋‹ค.

 

 

Project Structure > Project > Project SDK & Project  language level

 

Project Structure > Modules > Language level

 

Terminal JDK version

์ฆ‰ ์œ„ ์„ค์ •์„ ๋ณด๋ฉด ํ”„๋กœ์ ํŠธ๋Š” 1.8์ด๋‚˜ ํ„ฐ๋ฏธ๋„์—์„œ๋Š” 17๋กœ ์„ค์ •๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•œ๋‹ค.

 

 

 

JDK ๋ฒ„์ „ ๋ณ€๊ฒฝ(MacOS ๊ธฐ์ค€)

  • /usr/libexec/java_home -V : JDK ๋ฒ„์ „ ํ™•์ธ

 

 

  • vim ~/.bash_profile : JAVA ๊ฒฝ๋กœ ์„ค์ •

 

 

  • source ~/.bash_profile : ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ ์šฉ

 

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€