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 8174694 8181033
27 * @summary improve error message shown when main class can't be loaded
28 * @compile MainClassCantBeLoadedTest.java
29 * @run main MainClassCantBeLoadedTest
30 */
31
32 import java.io.*;
33 import java.util.*;
34
35 public class MainClassCantBeLoadedTest extends TestHelper {
36 private MainClassCantBeLoadedTest(){}
37
38 @Test
39 void testLoadingClassWithMissingSuper() throws Exception {
40 if (!isEnglishLocale()) {
41 return;
42 }
43
44 File cwd = new File(".");
45 File srcDir = new File(cwd, "src");
46 if (srcDir.exists()) {
47 recursiveDelete(srcDir);
|
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 8174694 8181033
27 * @summary improve error message shown when main class can't be loaded
28 * @modules java.compiler
29 * @compile MainClassCantBeLoadedTest.java
30 * @run main MainClassCantBeLoadedTest
31 */
32
33 import java.io.*;
34 import java.util.*;
35
36 public class MainClassCantBeLoadedTest extends TestHelper {
37 private MainClassCantBeLoadedTest(){}
38
39 @Test
40 void testLoadingClassWithMissingSuper() throws Exception {
41 if (!isEnglishLocale()) {
42 return;
43 }
44
45 File cwd = new File(".");
46 File srcDir = new File(cwd, "src");
47 if (srcDir.exists()) {
48 recursiveDelete(srcDir);
|