newrelic/nrjmx

Improve how shell wrapper executes the nr-jmx jar

Closed this issue · 0 comments

The shell script nrjmx runs a naked exec of java without any error handling or proper discovery of the java binary. It would be helpful for an operator trying to use this script if it had some improved error handling

  • if it attempted to use java binary in JAVA_HOME first since by convention that's where most applications e.g gradle springboot and tomcat look for java
  • fail with a useful error message if it nots found in the path
  • fail with a useful error message if the jar dis not found
  • fail if there's an unitialized variable in the shell script