Search code examples
javajargraphhopper

"Error: Unable to access jarfile *.jar" - what's the remedy?


the error was in response to command: C:\Users\User1>java -Ddw.graphhopper.datareader.file=berlin-latest.osm.pbf -jar *.jar server config-example.yml

the previous command: wget https://github.com/graphhopper/graphhopper/releases/download/6.0/graphhopper-web-6.0.jar https://raw.githubusercontent.com/graphhopper/graphhopper/6.x/config-example.yml http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf

seemed to be correctly executed.

I have windows 10 machine with 'Eclipse Adoptium jdk-17.0.5.8-hotspot' installed.

It seems to me as an environment problem but I'm not a programmer, so it's a wild guess :)

Actually I'm following the instructions given in github in relation to GraphHopper: https://github.com/graphhopper/graphhopper#get-started text

I was hoping to see a log message with 'Server - Started' :(

I'm not sure what exactly jave trying to access. google doesn't bring anything useful mentioning '*.jar'


Solution

  • Well, with the kind and fast help of 'g00se', the answer is: The wildcard *.jar cannot be used with '-jar'. a single definite file name is required.

    In the specific context of my question instead of: "-jar *.jar" the syntax should be: "-jar graphhopper-web-6.0.jar".

    The Server is actually started now :)

    Hope the GraphHopper people will correct their instructions on github for the sack of java-nonliterate people like myself :):)