--- old/test/compiler/codegen/6823354/Test6823354.java 2015-09-08 18:49:43.150282462 +0300 +++ new/test/compiler/codegen/6823354/Test6823354.java 2015-09-08 18:49:43.030282459 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2015, 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 @@ -25,11 +25,14 @@ * @test * @bug 6823354 * @summary These methods can be instrinsified by using bit scan, bit test, and population count instructions. - * + * @library /testlibrary * @run main/othervm -Xcomp -XX:CompileOnly=Test6823354.lzcomp,Test6823354.tzcomp,.dolzcomp,.dotzcomp Test6823354 */ +import java.io.File; +import java.net.URL; import java.net.URLClassLoader; +import jdk.test.lib.Utils; public class Test6823354 { // Arrays of corner case values. @@ -197,8 +200,9 @@ static void loadandrunclass(String classname) throws Exception { Class cl = Class.forName(classname); - URLClassLoader apploader = (URLClassLoader) cl.getClassLoader(); - ClassLoader loader = new URLClassLoader(apploader.getURLs(), apploader.getParent()); + ClassLoader apploader = cl.getClassLoader(); + ClassLoader loader + = Utils.getTestClassPathURLClassLoader(apploader.getParent()); Class c = loader.loadClass(classname); Runnable r = (Runnable) c.newInstance(); r.run();