tensorflow / java

Java bindings for TensorFlow
Apache License 2.0
785 stars 193 forks source link

Unable to build the project using 'mvn install ' command #507

Open ManojLL opened 6 months ago

ManojLL commented 6 months ago

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

Describe the problem

I hit the command mvn install to build project. then I get an error as below.

image

Craigacp commented 6 months ago

What's your $JAVA_HOME set to?

ManojLL commented 6 months ago

@Craigacp I use JENV to manage multiplue java version in my machine. So my $JAVA_HOME is set as /home/manoj/.jenv/versions/1.8.0.202

Craigacp commented 6 months ago

Maven pulls java from JAVA_HOME not the java it finds on your path, so it's using Java 8 to compile it and our minimum is 11. If you set your java home to 11 it should be fine.

karllessard commented 6 months ago

To do a full maven install locally without error, also add this parameter:

mvn install -Djavacpp.platform.host