24 import jdk.test.lib.Utils;
25 import jdk.test.lib.Platform;
26 import jdk.test.lib.process.ProcessTools;
27
28 import java.nio.file.Files;
29 import java.nio.file.Path;
30 import java.nio.file.Paths;
31 import java.util.concurrent.TimeUnit;
32 import java.util.concurrent.atomic.AtomicReference;
33
34 /**
35 * @test
36 * @bug 6434402 8004926
37 * @author Jaroslav Bachorik
38 *
39 * @library /test/lib
40 * @modules java.management
41 * jdk.attach
42 * jdk.management.agent/jdk.internal.agent
43 *
44 * @requires (os.family == "linux" | os.family == "solaris")
45 * @build TestManager TestApplication CustomLauncherTest
46 * @run main/othervm/native CustomLauncherTest
47 */
48 public class CustomLauncherTest {
49
50 public static final String TEST_NATIVE_PATH = System.getProperty("test.nativepath");
51
52 public static void main(String[] args) throws Exception {
53 if (".".equals(Utils.TEST_CLASS_PATH)) {
54 System.out.println("Test is designed to be run from jtreg only");
55 return;
56 }
57
58 Path libjvm = Platform.jvmLibDir().resolve("libjvm.so");
59 Process serverPrc = null, clientPrc = null;
60
61 try {
62 String launcher = getLauncher();
63
64 System.out.println("Starting custom launcher:");
|
24 import jdk.test.lib.Utils;
25 import jdk.test.lib.Platform;
26 import jdk.test.lib.process.ProcessTools;
27
28 import java.nio.file.Files;
29 import java.nio.file.Path;
30 import java.nio.file.Paths;
31 import java.util.concurrent.TimeUnit;
32 import java.util.concurrent.atomic.AtomicReference;
33
34 /**
35 * @test
36 * @bug 6434402 8004926
37 * @author Jaroslav Bachorik
38 *
39 * @library /test/lib
40 * @modules java.management
41 * jdk.attach
42 * jdk.management.agent/jdk.internal.agent
43 *
44 * @requires os.family == "linux"
45 * @build TestManager TestApplication CustomLauncherTest
46 * @run main/othervm/native CustomLauncherTest
47 */
48 public class CustomLauncherTest {
49
50 public static final String TEST_NATIVE_PATH = System.getProperty("test.nativepath");
51
52 public static void main(String[] args) throws Exception {
53 if (".".equals(Utils.TEST_CLASS_PATH)) {
54 System.out.println("Test is designed to be run from jtreg only");
55 return;
56 }
57
58 Path libjvm = Platform.jvmLibDir().resolve("libjvm.so");
59 Process serverPrc = null, clientPrc = null;
60
61 try {
62 String launcher = getLauncher();
63
64 System.out.println("Starting custom launcher:");
|