java
java copied to clipboard
Unable to build the project using 'mvn install ' command
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
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86_64): Ubuntu 22.04
- Java version (i.e., the output of
java -version): JDK 11 - Installed from Maven Central?: yes
Describe the problem
I hit the command mvn install to build project. then I get an error as below.
What's your $JAVA_HOME set to?
@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
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.
To do a full maven install locally without error, also add this parameter:
mvn install -Djavacpp.platform.host