logger.log(Level.SEVERE, "Invalid number of arguments");
throw new IllegalArgumentException("Invalid number of arguments");
}
//load properties from configuration file
SubstitutionProperties properties = null;
if (args.length == 0) {
properties = BootEnvironment.loadProperties(null);
} else {
properties = BootEnvironment.loadProperties(args[0]);
}
// get the JMX port and make the connection
String port = properties.getProperty(BootEnvironment.JMX_PORT,
BootEnvironment.DEFAULT_JMX_PORT);
JMXServiceURL url =
new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:" +
port + "/jmxrmi");
JMXConnector jmxc = JMXConnectorFactory.connect(url, null);