What needs to be done to launch tomcat via reflection?
jdk1.4 gives me java.lang.NoClassDefFoundError: javax/management/MBeanRegistration.


Why does jmx have to be in the bootstrap loader?

    System.setProperty("catalina.home", l_catalinaHome.getAbsolutePath());

    URL urls[] = new URL[] {
      new File(base, STANDALONE_BIN + "jmx.jar").toURL(),
      new File(base, STANDALONE_BIN + "bootstrap.jar").toURL(),
      new File(base, STANDALONE_BIN + "commons-logging-api.jar").toURL()
      };
    URLClassLoader ucl = new URLClassLoader(urls, null);

Class c = ucl.loadClass(className);
Method main = c.getDeclaredMethod("main", new Class[] {String[].class}
);
Object argslist[] = new Object[1];
argslist[0] = new String[] { "stop" };
Object ret = main.invoke(null, argslist);


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to