Hi! Could you please tell, which jdk should I use ...
# troubleshoot
r
Hi! Could you please tell, which jdk should I use to build datahub from source? When I run
./gradlew build
with jdk1.8.0 I get error
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':metadata-integration:java:datahub-protobuf:compileJava'.
> error: release version 11 not supported
when run with OpenJDK 11 I get a lot of errors
cannot find symbol @javax.annotation.processing.Generated
Copy code
Task :datahub-graphql-core:compileJava FAILED
/home/akravtsov/Documents/IdeaProjects/datahub-latest/datahub-graphql-core/src/mainGeneratedGraphQL/java/com/linkedin/datahub/graphql/generated/Entity.java:7: error: cannot find symbol
@javax.annotation.processing.Generated(
                            ^
  symbol:   class Generated
  location: package javax.annotation.processing
/home/akravtsov/Documents/IdeaProjects/datahub-latest/datahub-graphql-core/src/mainGeneratedGraphQL/java/com/linkedin/datahub/graphql/generated/EntityWithRelationships.java:7: error: cannot find symbol
@javax.annotation.processing.Generated(
                            ^
d
Do you run the build on Mac?
The build should be run with Java8 but ther is a component which needs java11. If you have it installed locally then the build will use that when it gets to that module.
r
I run it on Ubuntu, the exact command I use when build with java 8
Copy code
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_202 ./gradlew -Prest.model.compatibility=ignore build
my default JAVA_HOME points to java 11, this is the reason I specify it for gradlew
c
I think you can use https://sdkman.io/ It's really helpful
r
Tamas, Igor, thank you for help. I'll try set up build with both java 8 and 11 available for gradle resolution
e
I run the build in MAC, and the same erorr when run the “./gradlew build” in terminal. But sucess by clicking the “Build Module datahub” in Idea’s menu
i
I encurr in the same problem: on a m1 machine the graphql task fails!@curved-truck-53235 can you open up on your sdkman configuration more specifically?