29 import java.util.Properties;
30 import java.util.HashMap;
31
32 import javax.management.remote.JMXServiceURL;
33 import javax.management.remote.JMXConnector;
34 import javax.management.remote.JMXConnectorFactory;
35
36 import jdk.test.lib.thread.ProcessThread;
37 import jdk.testlibrary.Utils;
38
39 /*
40 * @test
41 * @summary Test for VirtualMachine.startManagementAgent and VirtualMachine.startLocalManagementAgent
42 *
43 * @library /lib/testlibrary
44 * @library /test/lib
45 * @modules java.management
46 * jdk.attach
47 * jdk.jartool/sun.tools.jar
48 *
49 * @run build Application SimpleProvider jdk.testlibrary.*
50 * @run main/timeout=300 StartManagementAgent
51 */
52
53 /*
54 * This test is not meant to test all possible configuration parameters to
55 * the JMX agent, there are other tests for that. This test makes sure it is
56 * possible to start the agent via attach.
57 */
58 public class StartManagementAgent {
59 public static void main(String[] args) throws Throwable {
60 ProcessThread processThread = null;
61 try {
62 System.out.println("Starting test application");
63 processThread = RunnerUtil.startApplication();
64 System.out.println("Application started");
65 runTests(processThread.getPid());
66 } catch (Throwable t) {
67 System.out.println("StartManagementAgent got unexpected exception: " + t);
68 t.printStackTrace();
69 throw t;
|
29 import java.util.Properties;
30 import java.util.HashMap;
31
32 import javax.management.remote.JMXServiceURL;
33 import javax.management.remote.JMXConnector;
34 import javax.management.remote.JMXConnectorFactory;
35
36 import jdk.test.lib.thread.ProcessThread;
37 import jdk.testlibrary.Utils;
38
39 /*
40 * @test
41 * @summary Test for VirtualMachine.startManagementAgent and VirtualMachine.startLocalManagementAgent
42 *
43 * @library /lib/testlibrary
44 * @library /test/lib
45 * @modules java.management
46 * jdk.attach
47 * jdk.jartool/sun.tools.jar
48 *
49 * @run build jdk.testlibrary.* Application SimpleProvider jdk.testlibrary.*
50 * @run main/timeout=300 StartManagementAgent
51 */
52
53 /*
54 * This test is not meant to test all possible configuration parameters to
55 * the JMX agent, there are other tests for that. This test makes sure it is
56 * possible to start the agent via attach.
57 */
58 public class StartManagementAgent {
59 public static void main(String[] args) throws Throwable {
60 ProcessThread processThread = null;
61 try {
62 System.out.println("Starting test application");
63 processThread = RunnerUtil.startApplication();
64 System.out.println("Application started");
65 runTests(processThread.getPid());
66 } catch (Throwable t) {
67 System.out.println("StartManagementAgent got unexpected exception: " + t);
68 t.printStackTrace();
69 throw t;
|