test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests

test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java

Print this page




  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 /*
  26  * @test
  27  * @summary Test a few scenarios if an empty class, which has the same name as the one in the jimage, is specified in the -Xbootclasspath/a
  28  *     1) boot loader will always load the class from the bootclasspath
  29  *     2) app loader will load the class from the jimage by default;
  30  *        app loader will load the class from the bootclasspath if the
  31  *        "--limit-modules java.base" option is specified
  32  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  33  * @library /test/lib /test/hotspot/jtreg/runtime/appcds
  34  * @modules java.base/jdk.internal.misc
  35  *          java.management
  36  *          jdk.jartool/sun.tools.jar
  37  *          jdk.internal.jvmstat/sun.jvmstat.monitor
  38  * @compile ../../test-classes/EmptyClassHelper.java
  39  * @compile ../../test-classes/com/sun/tools/javac/Main.jasm
  40  * @run main EmptyClassInBootClassPath
  41  */
  42 
  43 import java.io.File;
  44 import java.lang.*;
  45 import java.lang.reflect.*;
  46 import java.util.List;
  47 import java.util.ArrayList;
  48 import jdk.test.lib.process.OutputAnalyzer;
  49 
  50 public class EmptyClassInBootClassPath {
  51     static final String EXPECTED_EXCEPTION =
  52         "java.lang.NoSuchMethodException: com.sun.tools.javac.Main.main([Ljava.lang.String;)";




  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 /*
  26  * @test
  27  * @summary Test a few scenarios if an empty class, which has the same name as the one in the jimage, is specified in the -Xbootclasspath/a
  28  *     1) boot loader will always load the class from the bootclasspath
  29  *     2) app loader will load the class from the jimage by default;
  30  *        app loader will load the class from the bootclasspath if the
  31  *        "--limit-modules java.base" option is specified
  32  * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled
  33  * @library /test/lib /test/hotspot/jtreg/runtime/appcds
  34  * @modules java.base/jdk.internal.misc
  35  *          java.management
  36  *          jdk.jartool/sun.tools.jar
  37  *          jdk.internal.jvmstat/sun.jvmstat.monitor
  38  * @compile ../../test-classes/EmptyClassHelper.java
  39  * @compile ../../test-classes/com/sun/tools/javac/Main.jasm
  40  * @run main EmptyClassInBootClassPath
  41  */
  42 
  43 import java.io.File;
  44 import java.lang.*;
  45 import java.lang.reflect.*;
  46 import java.util.List;
  47 import java.util.ArrayList;
  48 import jdk.test.lib.process.OutputAnalyzer;
  49 
  50 public class EmptyClassInBootClassPath {
  51     static final String EXPECTED_EXCEPTION =
  52         "java.lang.NoSuchMethodException: com.sun.tools.javac.Main.main([Ljava.lang.String;)";


test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File