Thanks very much! I had to try quite a bit, but finally I managed to get the code running. There were several nasty error-messages, but with Karusell’s answer here (using new GraphhopperOSM()) in combination with your hints I was successful. Here’s the code:
import java.io.*;
import com.graphhopper.GraphHopper;
import com.graphhopper.reader.osm.GraphHopperOSM;
import com.graphhopper.routing.util.EncodingManager;
public class gh13_try {
public static void main(String[] args) {
System.out.println("Hello, World tester!");
final EncodingManager carEncoder = EncodingManager.create("car");
GraphHopper gh = new GraphHopperOSM().setEncodingManager(carEncoder);
String ghLoc = "../../winShare/ArbeitOhneSync/OSM/";
String currentArea = ghLoc + "malta-latest.osm.pbf";
System.out.println(new File(ghLoc, currentArea).getAbsolutePath());
gh.setGraphHopperLocation(ghLoc);
gh.setDataReaderFile(currentArea);
gh.importOrLoad();
}
}
I’m fully happy with this, but when trying to get a perfectly clean installation of GH that new one did not show the map in the browser when calling “./graphhopper.sh -a web -i europe_germany_berlin.pbf”, just the start and stop locations etc. Is 0.13 still developed and could some of those version be unable to show the map for some reason? As I said, my code works now and I can continue with that.
Many thanks again and probably until soon…!