code: public static List<String> enableJMX(List<String> jvmArgs) {
          final String arg = "-D" + OPT_JMX_REMOTE;
          if (jvmArgs.contains(arg))
              return jvmArgs;
          final List<String> cmdLine2 = new ArrayList<>(jvmArgs);
          cmdLine2.add(arg);
          return cmdLine2;
      }
docs: Adds an option to the JVM arguments to enable JMX connection
  
  @param jvmArgs the JVM args
  @return a new list of JVM args