< prev index next >

test/hotspot/jtreg/runtime/getSysPackage/GetSysPkgTest.java

Print this page
rev 59076 : [mq]: 8243945


  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  * @modules java.base/jdk.internal.misc
  27  * @modules java.base/jdk.internal.loader
  28  *          java.logging
  29  * @library /test/lib
  30  * @run main/othervm GetSysPkgTest
  31  */
  32 
  33 import java.io.File;
  34 import java.lang.reflect.InvocationTargetException;
  35 import java.lang.reflect.Method;
  36 import jdk.test.lib.compiler.InMemoryJavaCompiler;
  37 import jdk.test.lib.process.ProcessTools;
  38 import jdk.test.lib.process.OutputAnalyzer;
  39 
  40 // Test that JVM get_system_package() returns the module location for defined packages.
  41 public class GetSysPkgTest {
  42 
  43     private static Object invoke(Method m, Object obj, Object... args) throws Throwable {
  44         try {
  45             return m.invoke(obj, args);
  46         } catch (InvocationTargetException e) {
  47             throw e.getCause();
  48         }
  49     }
  50 




  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  * @modules java.base/jdk.internal.misc
  27  * @modules java.base/jdk.internal.loader
  28  *          java.logging
  29  * @library /test/lib
  30  * @run driver GetSysPkgTest
  31  */
  32 
  33 import java.io.File;
  34 import java.lang.reflect.InvocationTargetException;
  35 import java.lang.reflect.Method;
  36 import jdk.test.lib.compiler.InMemoryJavaCompiler;
  37 import jdk.test.lib.process.ProcessTools;
  38 import jdk.test.lib.process.OutputAnalyzer;
  39 
  40 // Test that JVM get_system_package() returns the module location for defined packages.
  41 public class GetSysPkgTest {
  42 
  43     private static Object invoke(Method m, Object obj, Object... args) throws Throwable {
  44         try {
  45             return m.invoke(obj, args);
  46         } catch (InvocationTargetException e) {
  47             throw e.getCause();
  48         }
  49     }
  50 


< prev index next >