code: public static boolean maybeLoad()
      {
          try
          {
              logger.debug("Will try to load mx4j now, if it's in the classpath");
              MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
              ObjectName processorName = new ObjectName("Server:name=XSLTProcessor");
  
              Class<?> httpAdaptorClass = Class.forName("mx4j.tools.adaptor.http.HttpAdaptor");
              Object httpAdaptor = httpAdaptorClass.newInstance();
              httpAdaptorClass.getMethod("setHost", String.class).invoke(httpAdaptor, getAddress());
              httpAdaptorClass.getMethod("setPort", Integer.TYPE).invoke(httpAdaptor, getPort());
  
              ObjectName httpName = new ObjectName("system:name=http");
              mbs.registerMBean(httpAdaptor, httpName);
  
              Class<?> xsltProcessorClass = Class.forName("mx4j.tools.adaptor.http.XSLTProcessor");
              Object xsltProcessor = xsltProcessorClass.newInstance();
              httpAdaptorClass.getMethod("setProcessor", Class.forName("mx4j.tools.adaptor.http.ProcessorMBean")).
                      invoke(httpAdaptor, xsltProcessor);
              mbs.registerMBean(xsltProcessor, processorName);
              httpAdaptorClass.getMethod("start").invoke(httpAdaptor);
              logger.info("mx4j successfuly loaded");
              return true;
          }
          catch (ClassNotFoundException e)
          {
              logger.debug("Will not load MX4J, mx4j-tools.jar is not in the classpath");
          }
          catch(Exception e)
          {
              logger.warn("Could not start register mbean in JMX", e);
          }
          return false;
      }
docs: Starts a JMX over http interface if and mx4j-tools.jar is in the classpath.
  @return true if successfully loaded.