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?
Each project has following defined on Gradle level:
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.
Version: 2020-03 (4.15.0)
Build id: 20200313-1211