The java utility on MAC seems to only work with Java version 8 update 51. Later Java versions (9, 10) seem to be incompatible.
This is how I got it working: Downloaded Java 8 Update 51 from the link below and installed it. The installed java binaries are stored in /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java. Created a temporay link called javaold using the following command:
sudo ln -s /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java javaold
And edited the ITR.sh file to use javaold instead of java. This way I kept my updated version of java working as well.
Crux of the matter is that you have to downgrade to an older version of java for the ITR utility to work. Hope this helps.
Link:
https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.H T M L#jre-8u51-oth-JPR