Attached a first "proof of concept" to myself for bsf4ooRexx
If one is interested in trying this, one should download the GraphHopper jar (graphhopper-web-1.0.jar) from: https://graphhopper.com/public/releases/graphhopper-web-1.0.jar and add the jar file to the CLASSPATH
One should be able to invoke the attached rexx with 1 argument a country name in lowercase(e.g. netherlands or austria) for any other country one should adapt the "from" and "to" latitude/longitude pairs to specify locations within that country.
The first time a country is processed to setup will take a long time (lots of minutes for bigger countries), subsequent invocations for that country will take most likely under 1 minute.
Out of curiosity I wanted to try this out but immediately ran into problems with JAVA, it requires version 6 of JAVA, I have version 8. Also after installing JAVA 6 I could not make it run, here a short recap.
po$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
po$ rexx graphhopper
No Java runtime present, requesting install.
po$ /usr/bin/java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
po$ echo $CLASSPATH
/Users/po/Downloads
po$ rexx graphhopper austria - Compiled routine "BsfLoadJava". - Compiled method "CALLWITH" with scope "Routine".
821 - .routines["XBSFLOADJAVA"]~callWith(arr)
145 - ::requires BSF.CLS -- loads Java support
Error 40 running /Users/po/Downloads/graphhopper.REX line 145: Incorrect call to routine.
Error 40.900: BSF4ooRexx/routine/BsfLoadJava(), error 5.994: initialization error, cannot find class 'org/rexxla/bsf/engines/rexx/Java4Rexx'.
I have the latest bsf4ooRexx from 2020-04-24 and I am on macOS 10.13 (High Sierra). Please note that JAVA 6 may not work on macOS Mojave or Catalina (10.14 and 10.15 respectively). Any hints on what to to is welcome.
PS I think this list is intended for discussions of the bsf4ooRexx Homepage, not discussions in general?
One should be able to invoke the attached rexx with 1 argument a country name in lowercase(e.g. netherlands or austria) for any other country one should adapt the "from" and "to" latitude/longitude pairs to specify locations within that country.
The first time a country is processed to setup will take a long time (lots of minutes for bigger countries), subsequent invocations for that country will take most likely under 1 minute.
Yes, please let us move this discussion to the support or developer list!
@P.O.: There is no need to use Java 6, I just ran it with Java 8 on Windows. You seem to have no Java on that Mac installed as Apple originally prompted the user to install Apple's Java 6 which by now is not supported anymore. Also your CLASSPATH is not set up as a class from the BSF4ooRexx.jar package cannot be found. Are you sure that on that Mac you have properly installed Java and BSF4ooRexx?
@Ruurd: running your script causes a runtime error. I slightly changed your script to get all Java exceptions printed that caused the Scripting error to be thrown.
The causing Java exception is: [java.lang.IllegalStateException: Your specified OSM file does not exist:G:\test\bsf4oorexx\ruurd\ch-latest.osm.pbf]. This is the content of the directory:
Yes, please let us move this discussion to the support or developer list!
If you move the discussion I will follow.
@P.O.: There is no need to use Java 6, I just ran it with Java 8 on Windows. You seem to have no Java on that Mac installed as Apple originally prompted the user to install Apple's Java 6 which by now is not supported anymore. Also your CLASSPATH is not set up as a class from the BSF4ooRexx.jar package cannot be found. Are you sure that on that Mac you have properly installed Java and BSF4ooRexx?
The installation of JAVA 6 was not my idea :-( the request to install Java 6 arises as soon as I try to run the program, the program does not launch before Java 6 is installed. And after the installation the program fail to run as described below. I think we had this discussion/problem in the past with a Java installation that it is not possible to get past.
I have Java 8 installed and automatically updated, let me know what command besides java -version to use to find out what is missing.
I took the latest bsf4ooRexx installer from Sourceforge today, there is no conflict with other ooRexx installations, I have checked.
I have defined the classpath in the same way as the path, in ,bash_profile and It points to ~/Downloads, where I have put the jar file and the rexx program, as per the instruction.
I cannot append the the ticket page on sourceforge for some reason.
I have not found any reason why GraphHopper would want to use Java 6 on
Mac OS.
In case you have solved that problem before trying to run my very simple
script( which just tries to use the GraphHopper routing engine to
rretrieve textual turn directions ) you should take care of the
following things:
1 GraphHopper uses Open Street Map files for its routing engine, so my
script needs thos as well and nobody else but has those lying around on
their system I guess. So please add the following snippet just after the
"echo $CLASSPATH" and those files will be downloaded for you (if MacOS
has "wget" that is):
-- Determine the OSM file we need
osmFile = country"-latest.osm.pbf"
osmWeb = "http://download.geofabrik.de/europe/"
if \SysFileExists(osmFile) then do
say "OpenStreetMap file:" osmFile "does not exist going to download
it from:" osmWeb
"wget -S -nv -O" osmFile osmWeb||osmFile
end
For the initial set up you need to set the JAVA allowed maximum
(|-Xmx128m)| to certainly 2GB for countries like austria and denmark and
probably much higher for the bigger ones like Spain and France.
Don't forget this is just a "proof-of-concept" for me to establish if
I can use bsf4ooRexx in a more useful way than just showing some fancy
windows.
I cannot append the the ticket page on sourceforge for some reason.
I think you need to be logged in.
Consider signing up for (all) mailing lists, valuable info. Rony already gave some hints.
I have not found any reason why GraphHopper would want to use Java 6 on
Mac OS.
This is a macOS thing, I have version 8 installed. For some reason macOS fail to detect the JAVA installation and launches this request. I have solved it now.
In case you have solved that problem before trying to run my very simple
script( which just tries to use the GraphHopper routing engine to
rretrieve textual turn directions ) you should take care of the
following things:
1 GraphHopper uses Open Street Map files for its routing engine, so my
script needs thos as well and nobody else but has those lying around on
their system I guess. So please add the following snippet just after the
"echo $CLASSPATH" and those files will be downloaded for you (if MacOS
has "wget" that is):
-- Determine the OSM file we need
osmFile = country"-latest.osm.pbf"
osmWeb = "http://download.geofabrik.de/europe/"
if \SysFileExists(osmFile) then do
say "OpenStreetMap file:" osmFile "does not exist going to download
it from:" osmWeb
"wget -S -nv -O" osmFile osmWeb||osmFile
end
Will give it a try manâna.
For the initial set up you need to set the JAVA allowed maximum
(|-Xmx128m)| to certainly 2GB for countries like austria and denmark and
probably much higher for the bigger ones like Spain and France.
Don't forget this is just a "proof-of-concept" for me to establish if
I can use bsf4ooRexx in a more useful way than just showing some fancy
windows.
ruurd@Paradigit2:~/Rexx$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)
ruurd@Paradigit2:~/Rexx$ uname -a
Linux Paradigit2 5.3.0-59-generic #53~18.04.1-Ubuntu SMP Thu Jun 4 14:58:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Maybe GraphHopper requires Java 6 on MacOS, but certainly not on Linux Mint, I'll see if I can find out and you're prbably right about the purpos of this page, I guess we should move to the discussions page.
Greetz,
Ruurd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Attached a first "proof of concept" to myself for bsf4ooRexx
If one is interested in trying this, one should download the GraphHopper jar (graphhopper-web-1.0.jar) from: https://graphhopper.com/public/releases/graphhopper-web-1.0.jar and add the jar file to the CLASSPATH
One should be able to invoke the attached rexx with 1 argument a country name in lowercase(e.g. netherlands or austria) for any other country one should adapt the "from" and "to" latitude/longitude pairs to specify locations within that country.
The first time a country is processed to setup will take a long time (lots of minutes for bigger countries), subsequent invocations for that country will take most likely under 1 minute.
Dear Ruurd,
Out of curiosity I wanted to try this out but immediately ran into problems with JAVA, it requires version 6 of JAVA, I have version 8. Also after installing JAVA 6 I could not make it run, here a short recap.
po$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
po$ rexx graphhopper
No Java runtime present, requesting install.
<installling java="" javaforosx,="" 6=""></installling>
po$ /usr/bin/java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
po$ echo $CLASSPATH
/Users/po/Downloads
po$ rexx graphhopper austria
- Compiled routine "BsfLoadJava".
- Compiled method "CALLWITH" with scope "Routine".
821 - .routines["XBSFLOADJAVA"]~callWith(arr)
145 - ::requires BSF.CLS -- loads Java support
Error 40 running /Users/po/Downloads/graphhopper.REX line 145: Incorrect call to routine.
Error 40.900: BSF4ooRexx/routine/BsfLoadJava(), error 5.994: initialization error, cannot find class 'org/rexxla/bsf/engines/rexx/Java4Rexx'.
I have the latest bsf4ooRexx from 2020-04-24 and I am on macOS 10.13 (High Sierra). Please note that JAVA 6 may not work on macOS Mojave or Catalina (10.14 and 10.15 respectively). Any hints on what to to is welcome.
PS I think this list is intended for discussions of the bsf4ooRexx Homepage, not discussions in general?
Hälsningar/Regards/Grüsse,
P.O. Jonsson
oorexx@jonases.se
Yes, please let us move this discussion to the support or developer list!
@P.O.: There is no need to use Java 6, I just ran it with Java 8 on Windows. You seem to have no Java on that Mac installed as Apple originally prompted the user to install Apple's Java 6 which by now is not supported anymore. Also your CLASSPATH is not set up as a class from the BSF4ooRexx.jar package cannot be found. Are you sure that on that Mac you have properly installed Java and BSF4ooRexx?
@Ruurd: running your script causes a runtime error. I slightly changed your script to get all Java exceptions printed that caused the Scripting error to be thrown.
The causing Java exception is: [java.lang.IllegalStateException: Your specified OSM file does not exist:G:\test\bsf4oorexx\ruurd\ch-latest.osm.pbf]. This is the content of the directory:
This is the extended error message from the edited script:
Again, please let us continue on the support mailing list.
Dear Rony,
I have Java 8 installed and automatically updated, let me know what command besides java -version to use to find out what is missing.
I took the latest bsf4ooRexx installer from Sourceforge today, there is no conflict with other ooRexx installations, I have checked.
I have defined the classpath in the same way as the path, in ,bash_profile and It points to ~/Downloads, where I have put the jar file and the rexx program, as per the instruction.
<snip></snip>
Hi PO
I cannot append the the ticket page on sourceforge for some reason.
I have not found any reason why GraphHopper would want to use Java 6 on
Mac OS.
In case you have solved that problem before trying to run my very simple
script( which just tries to use the GraphHopper routing engine to
rretrieve textual turn directions ) you should take care of the
following things:
1 GraphHopper uses Open Street Map files for its routing engine, so my
script needs thos as well and nobody else but has those lying around on
their system I guess. So please add the following snippet just after the
"echo $CLASSPATH" and those files will be downloaded for you (if MacOS
has "wget" that is):
-- Determine the OSM file we need
osmFile = country"-latest.osm.pbf"
osmWeb = "http://download.geofabrik.de/europe/"
if \SysFileExists(osmFile) then do
say "OpenStreetMap file:" osmFile "does not exist going to download
it from:" osmWeb
"wget -S -nv -O" osmFile osmWeb||osmFile
end
For the initial set up you need to set the JAVA allowed maximum
(|-Xmx128m)| to certainly 2GB for countries like austria and denmark and
probably much higher for the bigger ones like Spain and France.
Don't forget this is just a "proof-of-concept" for me to establish if
I can use bsf4ooRexx in a more useful way than just showing some fancy
windows.
Greetz,
Ruurd
Von meinem iPhone gesendet
I think you need to be logged in.
Consider signing up for (all) mailing lists, valuable info. Rony already gave some hints.
Hi PO,
I'm running Linux Mint19.3 (Ubuntu 18.04):
ruurd@Paradigit2:~/Rexx$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)
ruurd@Paradigit2:~/Rexx$ uname -a
Linux Paradigit2 5.3.0-59-generic #53~18.04.1-Ubuntu SMP Thu Jun 4 14:58:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Maybe GraphHopper requires Java 6 on MacOS, but certainly not on Linux Mint, I'll see if I can find out and you're prbably right about the purpos of this page, I guess we should move to the discussions page.
Greetz,
Ruurd
Oops didn't see Rony's response in time, yeah let's move.
Ruurd
O.K. let us continue here: https://sourceforge.net/p/bsf4oorexx/support-requests/11/