Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19854

Build path is incomplete. Cannot find the class file for java.lang

$
0
0

Hi,

When opening a Gradle project via buildship I get following for error for all sub projects and compilation fails with many errors as it can’t find classes under java.lang package which suggests JDK is not properly in class path.

“The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project”

When checking the project build path after buildship is done, I can see correct JDK version added under module path and dependencies resolved.

Can someone please let me know what I am doing wrong?

Thanks.


Each project has following defined on Gradle level:

java {
sourceCompatibility = JavaVersion.VERSION_13
targetCompatibility = JavaVersion.VERSION_13
}

Eclipse has jdk-14+36 added and linked with JavaSE-13 execution environment.

jdk-14+36 is also in PATH and gradle daemon is using it.

Versions:

Eclipse
Version: 2020-03 (4.15.0)
Build id: 20200313-1211

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

Buildship
3.1.4.v20200326-1743


Viewing all articles
Browse latest Browse all 19854

Trending Articles