I\'m trying to use maven to build a jar but I keep getting the error
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (d
Maven relies on the JAVA_HOME environment variable being set. Set it according to your OS and re-run your build.
Edit: Use export to set the variable.
export JAVA_HOME=/path/to/java