< prev index next >

test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java

Print this page
rev 51959 : resolve JDK-8211122


  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 import java.lang.module.ModuleDescriptor;
  25 import java.lang.module.ModuleDescriptor.*;
  26 import java.lang.module.ModuleFinder;
  27 import java.lang.module.ModuleReference;
  28 import java.io.IOException;
  29 import java.io.UncheckedIOException;
  30 import java.nio.file.Files;
  31 import java.nio.file.Path;
  32 import java.nio.file.Paths;
  33 import java.util.List;
  34 import java.util.Map;
  35 import java.util.Set;
  36 
  37 import jdk.internal.misc.JavaLangModuleAccess;
  38 import jdk.internal.misc.SharedSecrets;
  39 import org.testng.annotations.Test;
  40 import static org.testng.Assert.*;
  41 
  42 /**
  43  * @test
  44  * @bug 8142968 8173381
  45  * @library /lib/testlibrary
  46  * @modules java.base/jdk.internal.misc
  47  * @modules java.base/jdk.internal.module
  48  * @modules java.base/jdk.internal.org.objectweb.asm
  49  * @build ModuleTargetHelper
  50  * @run testng SystemModulesTest
  51  * @summary Verify the properties of ModuleDescriptor created
  52  *          by SystemModules
  53  */
  54 
  55 public class SystemModulesTest {
  56     private static final JavaLangModuleAccess JLMA =
  57         SharedSecrets.getJavaLangModuleAccess();
  58     private static final String OS_NAME = System.getProperty("os.name");
  59     private static final String OS_ARCH = System.getProperty("os.arch");
  60     //  system modules containing no package
  61     private static final Set<String> EMPTY_MODULES =
  62         Set.of("java.se", "jdk.jdwp.agent", "jdk.pack");
  63 
  64     @Test
  65     public void testSystemModules() {
  66         Path jimage = Paths.get(System.getProperty("java.home"), "lib", "modules");




  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 import java.lang.module.ModuleDescriptor;
  25 import java.lang.module.ModuleDescriptor.*;
  26 import java.lang.module.ModuleFinder;
  27 import java.lang.module.ModuleReference;
  28 import java.io.IOException;
  29 import java.io.UncheckedIOException;
  30 import java.nio.file.Files;
  31 import java.nio.file.Path;
  32 import java.nio.file.Paths;
  33 import java.util.List;
  34 import java.util.Map;
  35 import java.util.Set;
  36 
  37 import jdk.internal.access.JavaLangModuleAccess;
  38 import jdk.internal.access.SharedSecrets;
  39 import org.testng.annotations.Test;
  40 import static org.testng.Assert.*;
  41 
  42 /**
  43  * @test
  44  * @bug 8142968 8173381
  45  * @library /lib/testlibrary
  46  * @modules java.base/jdk.internal.access
  47  * @modules java.base/jdk.internal.module
  48  * @modules java.base/jdk.internal.org.objectweb.asm
  49  * @build ModuleTargetHelper
  50  * @run testng SystemModulesTest
  51  * @summary Verify the properties of ModuleDescriptor created
  52  *          by SystemModules
  53  */
  54 
  55 public class SystemModulesTest {
  56     private static final JavaLangModuleAccess JLMA =
  57         SharedSecrets.getJavaLangModuleAccess();
  58     private static final String OS_NAME = System.getProperty("os.name");
  59     private static final String OS_ARCH = System.getProperty("os.arch");
  60     //  system modules containing no package
  61     private static final Set<String> EMPTY_MODULES =
  62         Set.of("java.se", "jdk.jdwp.agent", "jdk.pack");
  63 
  64     @Test
  65     public void testSystemModules() {
  66         Path jimage = Paths.get(System.getProperty("java.home"), "lib", "modules");


< prev index next >