diff --git a/jdk/src/java.base/share/native/libjli/java.h b/jdk/src/java.base/share/native/libjli/java.h index cf9d37ecc8b..a4cecaa5545 100644 --- a/jdk/src/java.base/share/native/libjli/java.h +++ b/jdk/src/java.base/share/native/libjli/java.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -228,7 +228,7 @@ enum LaunchMode { // cf. sun.launcher.LauncherHelper }; static const char *launchModeNames[] - = { "Unknown", "Main class", "JAR file" }; + = { "Unknown", "Main class", "JAR file", "Module" }; typedef struct { int argc; diff --git a/jdk/test/tools/launcher/MiscTests.java b/jdk/test/tools/launcher/MiscTests.java index c4e1f0b4cf7..3769d117894 100644 --- a/jdk/test/tools/launcher/MiscTests.java +++ b/jdk/test/tools/launcher/MiscTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 6856415 + * @bug 6856415 8154212 * @summary Miscellaneous tests, Exceptions * @compile -XDignore.symbol.file MiscTests.java * @run main MiscTests @@ -33,7 +33,9 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class MiscTests extends TestHelper { @@ -103,11 +105,22 @@ public class MiscTests extends TestHelper { } } + static void testJLDEnvWithTool() { + final Map envMap = new HashMap<>(); + envMap.put("_JAVA_LAUNCHER_DEBUG", "true"); + TestResult tr = doExec(envMap, javacCmd, "-version"); + tr.checkPositive(); + if (!tr.isOK()) { + System.out.println(tr); + } + } + public static void main(String... args) throws IOException { testWithClassPathSetViaProperty(); test6856415(); + testJLDEnvWithTool(); if (testExitValue != 0) { throw new Error(testExitValue + " tests failed"); + } } } -}