LoginSignup
0
0

More than 1 year has passed since last update.

Kotlinのエラー:java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel

Posted at

“Kotlin サーバーサイドプログラミング実践開発“ 著者:竹端 尚人にて
第2部のアプリケーション作成でSpring Initializrをダウンロードしてビルドしただけなのにエラーが出たのでその対処

gradleのキャッシュを削除

$ rm -rf $HOME/.gradle/caches/

以上。

原因はJDL15で以前いじっていたことがあったからそれが原因みたい。

一応、不要なJDKは削除しておいたほうがいいかも

インストールされているJDLの削除方法

//現状インストールされているJDKを一覧で取得
$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    11.0.13, x86_64:    "Amazon Corretto 11"    /Users/nash/Library/Java/JavaVirtualMachines/corretto-11.0.13/Contents/Home
    11.0.12.1, x86_64:  "Amazon Corretto 11"    /Users/nash/Library/Java/JavaVirtualMachines/corretto-11.0.12/Contents/Home

/Users/nash/Library/Java/JavaVirtualMachines/corretto-11.0.13/Contents/Home

// corretto-11.0.12を削除する場合は下記のように書く
$ sudo rm -rf /Users/nash/Library/Java/JavaVirtualMachines/corretto-11.0.12/
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0