I'm building a JVM diagnostics tool and I'm connecting to the JVMs using JMX, the Issue I'm facing here is that I need to be able to load tools.jar in a way that is compatible throughout unixes and windows, currently I'm using the gradle-generated run scripts to load the tools.jar
to the classpath but it seems this method depends on too many factors.
Does anyone knows the recommended or elegant way of making this jar available on the classpath without actually blindly guessing where is it?