No compatible version of java 1.5 is available
Java 1.5 is very old and is not available for current macOS - I think it predates 10.6. Java 6 came out in 2006

You can get Java 6 from Apple and Java 7.8 or 9 from Oracle.

As for where java is installed. It's complex. /Library/Internet Plug-Ins is for web app Java not from Apple this would not set a Java in the terminal.

The java -version result implies that you do not have any Java installed.

First step is to ask the program's author where you can get a modern version of their app from which does not use an insecure unsupported version of Java. Then install that Java