3941N/A/*
3941N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
3941N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3941N/A *
3941N/A * This code is free software; you can redistribute it and/or modify it
3941N/A * under the terms of the GNU General Public License version 2 only, as
3941N/A * published by the Free Software Foundation.
3941N/A *
3941N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3941N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3941N/A * version 2 for more details (a copy is included in the LICENSE file that
3941N/A * accompanied this code).
3941N/A *
3941N/A * You should have received a copy of the GNU General Public License version
3941N/A * 2 along with this work; if not, write to the Free Software Foundation,
3941N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3941N/A *
3941N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3941N/A * or visit www.oracle.com if you need additional information or have any
3941N/A * questions.
3941N/A */
3941N/A
3941N/A/*
3941N/A * @test
3941N/A * @bug 7002839
3941N/A * @summary Static init deadlock Win32GraphicsEnvironment and WToolkit
3941N/A * @run main/othervm -Djava.awt.headless=true GE_init6
3941N/A */
3941N/A
3941N/Aimport java.awt.*;
3941N/A
3941N/Apublic class GE_init6 {
3941N/A private static boolean passed = false;
3941N/A public static void main(String[] args) {
3941N/A try {
3941N/A new Frame("Test3").setVisible(true);
3941N/A } catch (HeadlessException e){
3941N/A passed = true;
3941N/A }
3941N/A if (!passed){
3941N/A throw new RuntimeException("Should have thrown HE but it either didn't throw any or just passed through.");
3941N/A }
3941N/A }
3941N/A}