1 /*
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8001533 8004547 8035782
27 * @summary Test launching FX application with java -jar
28 * Test uses main method and blank main method, a jfx app class and an incorrest
29 * jfx app class, a main-class for the manifest, a bogus one and none.
30 * All should execute except the incorrect fx app class entries.
31 * @run main/othervm FXLauncherTest
32 * @key intermittent
33 */
34 import java.io.File;
35 import java.io.IOException;
36 import java.util.ArrayList;
37 import java.util.List;
38
39 public class FXLauncherTest extends TestHelper {
40 private static final String FX_MARKER_CLASS = "javafx.application.Application";
41 private static void line() {
42 System.out.println("_____________________________________________");
43 }
44 private static File MainJavaFile = null;
45 private static final File FXtestJar = new File("fxtest.jar");
46 private static final File ManifestFile = new File("manifest.txt");
47 private static final File ScratchDir = new File(".");
48
49 /* standard main class can be used as java main for fx app class */
50 static final String StdMainClass = "helloworld.HelloWorld";
51 static final String ExtMainClass = "helloworld.ExtHello";
52 static final String NonFXMainClass = "helloworld.HelloJava";
|
1 /*
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8001533 8004547 8035782
27 * @summary Test launching FX application with java -jar
28 * Test uses main method and blank main method, a jfx app class and an incorrest
29 * jfx app class, a main-class for the manifest, a bogus one and none.
30 * All should execute except the incorrect fx app class entries.
31 * @run main/othervm FXLauncherTest
32 * @key intermittent headful
33 */
34 import java.io.File;
35 import java.io.IOException;
36 import java.util.ArrayList;
37 import java.util.List;
38
39 public class FXLauncherTest extends TestHelper {
40 private static final String FX_MARKER_CLASS = "javafx.application.Application";
41 private static void line() {
42 System.out.println("_____________________________________________");
43 }
44 private static File MainJavaFile = null;
45 private static final File FXtestJar = new File("fxtest.jar");
46 private static final File ManifestFile = new File("manifest.txt");
47 private static final File ScratchDir = new File(".");
48
49 /* standard main class can be used as java main for fx app class */
50 static final String StdMainClass = "helloworld.HelloWorld";
51 static final String ExtMainClass = "helloworld.ExtHello";
52 static final String NonFXMainClass = "helloworld.HelloJava";
|