< prev index next >

test/sun/tools/jhsdb/BasicLauncherTest.java

Print this page




 126     public static void launch(String expectedMessage, String... toolArgs)
 127         throws IOException {
 128 
 129         launch(expectedMessage, Arrays.asList(toolArgs));
 130     }
 131 
 132     public static void main(String[] args)
 133         throws IOException {
 134 
 135         if (!Platform.shouldSAAttach()) {
 136             // Silently skip the test if we don't have enough permissions to attach
 137             System.err.println("Error! Insufficient permissions to attach.");
 138             return;
 139         }
 140 
 141         launchCLHSDB();
 142 
 143         launch("No deadlocks found", "jstack");
 144         launch("compiler detected", "jmap");
 145         launch("Java System Properties", "jinfo");

 146 
 147         // The test throws RuntimeException on error.
 148         // IOException is thrown if LingeredApp can't start because of some bad
 149         // environment condition
 150         System.out.println("Test PASSED");
 151     }
 152 }


 126     public static void launch(String expectedMessage, String... toolArgs)
 127         throws IOException {
 128 
 129         launch(expectedMessage, Arrays.asList(toolArgs));
 130     }
 131 
 132     public static void main(String[] args)
 133         throws IOException {
 134 
 135         if (!Platform.shouldSAAttach()) {
 136             // Silently skip the test if we don't have enough permissions to attach
 137             System.err.println("Error! Insufficient permissions to attach.");
 138             return;
 139         }
 140 
 141         launchCLHSDB();
 142 
 143         launch("No deadlocks found", "jstack");
 144         launch("compiler detected", "jmap");
 145         launch("Java System Properties", "jinfo");
 146         launch("compiler detected.", "jsnap");
 147 
 148         // The test throws RuntimeException on error.
 149         // IOException is thrown if LingeredApp can't start because of some bad
 150         // environment condition
 151         System.out.println("Test PASSED");
 152     }
 153 }
< prev index next >