test/demo/jvmti/mtrace/TraceJFrame.java
Print this page
*** 30,42 ****
* @compile JFrameCreateTime.java
* @build TraceJFrame
* @run main TraceJFrame JFrameCreateTime
*/
! public class TraceJFrame {
public static void main(String args[]) throws Exception {
DemoRun demo;
/* Run demo that uses JVMTI mtrace agent (no options) */
demo = new DemoRun("mtrace", "" /* options to mtrace */ );
demo.runit(args[0]);
--- 30,46 ----
* @compile JFrameCreateTime.java
* @build TraceJFrame
* @run main TraceJFrame JFrameCreateTime
*/
! 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,52 ****
--- 51,57 ----
}
/* Must be a pass. */
System.out.println("Test passed - cleanly terminated");
}
+ }
}