Jenkins has its own mechanisms for working with variables, for example, here: or using the EnvInject plugin Unfortunately, there are not enough details in your question (where the path to the JDK is given, this is a freestyle job or Jenkins pipeline, how exactly JMeter is started) The easiest way is to hard code the path to JRE / bin / java where you start JMeter