You can research the Interactive Broker Client Portal API here:
https://interactivebrokers.github.io/cpwebapi/
Java is not recognized as an internal or external command
See this:
https://stackoverflow.com/questions/15796855/java-is-not-recognized-as-an-internal-or-external-command