< prev index next >

test/runtime/SharedArchiveFile/BootAppendTests.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  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  * @summary Testing -Xbootclasspath/a support for CDS
  27  * @library /testlibrary
  28  * @modules java.base/jdk.internal.misc
  29  *          java.management
  30  *          jdk.jvmstat/sun.jvmstat.monitor
  31  * @ignore 8150683
  32  * @compile javax/sound/sampled/MyClass.jasm
  33  * @compile org/omg/CORBA/Context.jasm
  34  * @compile nonjdk/myPackage/MyClass.java
  35  * @build jdk.test.lib.* LoadClass ClassFileInstaller
  36  * @run main/othervm BootAppendTests
  37  */
  38 
  39 import java.io.File;
  40 import java.io.FileOutputStream;
  41 import java.io.IOException;
  42 import java.io.PrintStream;
  43 
  44 import java.nio.file.Path;
  45 import java.nio.file.Paths;
  46 
  47 import jdk.test.lib.ProcessTools;
  48 import jdk.test.lib.OutputAnalyzer;
  49 
  50 public class BootAppendTests {
  51     private static final String APP_CLASS = "LoadClass";
  52     private static final String BOOT_APPEND_MODULE_CLASS = "javax/sound/sampled/MyClass";
  53     private static final String BOOT_APPEND_DUPLICATE_MODULE_CLASS = "org/omg/CORBA/Context";
  54     private static final String BOOT_APPEND_CLASS = "nonjdk/myPackage/MyClass";
  55     private static final String BOOT_APPEND_MODULE_CLASS_NAME =
  56         BOOT_APPEND_MODULE_CLASS.replace('/', '.');
  57     private static final String BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME =
  58         BOOT_APPEND_DUPLICATE_MODULE_CLASS.replace('/', '.');
  59     private static final String BOOT_APPEND_CLASS_NAME =
  60         BOOT_APPEND_CLASS.replace('/', '.');
  61     private static final String[] ARCHIVE_CLASSES =
  62         {BOOT_APPEND_MODULE_CLASS, BOOT_APPEND_DUPLICATE_MODULE_CLASS, BOOT_APPEND_CLASS};
  63 
  64     private static final String modes[] = {"on", "off"};
  65 
  66     private static String appJar;
  67     private static String bootAppendJar;
  68 




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  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  * @summary Testing -Xbootclasspath/a support for CDS
  27  * @library /test/lib
  28  * @modules java.base/jdk.internal.misc
  29  *          java.management
  30  *          jdk.jvmstat/sun.jvmstat.monitor
  31  * @ignore 8150683
  32  * @compile javax/sound/sampled/MyClass.jasm
  33  * @compile org/omg/CORBA/Context.jasm
  34  * @compile nonjdk/myPackage/MyClass.java
  35  * @build LoadClass
  36  * @run main/othervm BootAppendTests
  37  */
  38 
  39 import java.io.File;
  40 import java.io.FileOutputStream;
  41 import java.io.IOException;
  42 import java.io.PrintStream;
  43 
  44 import java.nio.file.Path;
  45 import java.nio.file.Paths;
  46 
  47 import jdk.test.lib.process.ProcessTools;
  48 import jdk.test.lib.process.OutputAnalyzer;
  49 
  50 public class BootAppendTests {
  51     private static final String APP_CLASS = "LoadClass";
  52     private static final String BOOT_APPEND_MODULE_CLASS = "javax/sound/sampled/MyClass";
  53     private static final String BOOT_APPEND_DUPLICATE_MODULE_CLASS = "org/omg/CORBA/Context";
  54     private static final String BOOT_APPEND_CLASS = "nonjdk/myPackage/MyClass";
  55     private static final String BOOT_APPEND_MODULE_CLASS_NAME =
  56         BOOT_APPEND_MODULE_CLASS.replace('/', '.');
  57     private static final String BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME =
  58         BOOT_APPEND_DUPLICATE_MODULE_CLASS.replace('/', '.');
  59     private static final String BOOT_APPEND_CLASS_NAME =
  60         BOOT_APPEND_CLASS.replace('/', '.');
  61     private static final String[] ARCHIVE_CLASSES =
  62         {BOOT_APPEND_MODULE_CLASS, BOOT_APPEND_DUPLICATE_MODULE_CLASS, BOOT_APPEND_CLASS};
  63 
  64     private static final String modes[] = {"on", "off"};
  65 
  66     private static String appJar;
  67     private static String bootAppendJar;
  68 


< prev index next >