Installation Error

I am trying to install Graphhopper using this commad

sudo apt-get install maven
git clone https://github.com/graphhopper/graphhopper.git
cd graphhopper
git checkout master
mvn clean install -DskipTests

It is showing the following error

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] javac: invalid flag: --release
Usage: javac <options> <source files>
use -help for a list of possible options

[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for GraphHopper Parent Project 9.0-SNAPSHOT:
[INFO] 
[INFO] GraphHopper Parent Project ......................... SUCCESS [  0.543 s]
[INFO] GraphHopper Web API ................................ FAILURE [  0.456 s]
[INFO] GraphHopper Core ................................... SKIPPED
[INFO] GraphHopper Reader for Gtfs Data ................... SKIPPED
[INFO] GraphHopper Tools .................................. SKIPPED
[INFO] GraphHopper Map Matching ........................... SKIPPED
[INFO] GraphHopper Directions API hand-crafted Java Client. SKIPPED
[INFO] GraphHopper Dropwizard Bundle ...................... SKIPPED
[INFO] GraphHopper Navigation ............................. SKIPPED
[INFO] GraphHopper Web .................................... SKIPPED
[INFO] GraphHopper Example ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.202 s
[INFO] Finished at: 2023-12-06T17:51:46+06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project graphhopper-web-api: Compilation failure
[ERROR] javac: invalid flag: --release
[ERROR] Usage: javac <options> <source files>
[ERROR] use -help for a list of possible options
[ERROR] 
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :graphhopper-web-api

Make sure you have installed at least JDK17 like it is documented. Or you use the latest release 8.0 (git checkout 8.x) which will still work with older JDKs.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.