How to solve java.lang.NoClassDefFoundError?

前端 未结 27 1557
暗喜
暗喜 2020-11-21 06:04

I\'ve tried both the example in Oracle\'s Java Tutorials. They both compile fine, but at run-time, both come up with this error:

Exception in thread \"main\"         


        
27条回答
  •  醉梦人生
    2020-11-21 06:36

    if you are using gradlew, go to ./gradle/wrapper/gradle-wrapper.properties and change distributionUrl to the correct version of gradle.

    If you are using JDK14 try

    distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
    

提交回复
热议问题