test/demo/jvmti/mtrace/TraceJFrame.java
Print this page
@@ -30,13 +30,17 @@
* @compile JFrameCreateTime.java
* @build TraceJFrame
* @run main TraceJFrame JFrameCreateTime
*/
-public class TraceJFrame {
+import java.awt.GraphicsEnvironment;
+public class TraceJFrame {
public static void main(String args[]) throws Exception {
+ if (GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance()) {
+ System.out.println("JFrame test was skipped due to headless mode");
+ } else {
DemoRun demo;
/* Run demo that uses JVMTI mtrace agent (no options) */
demo = new DemoRun("mtrace", "" /* options to mtrace */ );
demo.runit(args[0]);
@@ -47,6 +51,7 @@
}
/* Must be a pass. */
System.out.println("Test passed - cleanly terminated");
}
+ }
}