equal
deleted
inserted
replaced
88 // create an archive with both -cp and --module-path in the command line. |
88 // create an archive with both -cp and --module-path in the command line. |
89 // Only the class in the modular jar in the --module-path will be archived; |
89 // Only the class in the modular jar in the --module-path will be archived; |
90 // the class in the modular jar in the -cp won't be archived. |
90 // the class in the modular jar in the -cp won't be archived. |
91 OutputAnalyzer output = TestCommon.createArchive( |
91 OutputAnalyzer output = TestCommon.createArchive( |
92 destJar.toString(), appClasses, |
92 destJar.toString(), appClasses, |
93 "-Xlog:class+load=trace", |
|
94 "--module-path", moduleDir.toString(), |
93 "--module-path", moduleDir.toString(), |
95 "-m", TEST_MODULE1); |
94 "-m", TEST_MODULE1); |
96 TestCommon.checkDump(output); |
95 TestCommon.checkDump(output); |
97 |
96 |
98 // run with the archive using the same command line as in dump time. |
97 // run with the archive using the same command line as in dump time. |
167 // modify the timestamp of the jar file |
166 // modify the timestamp of the jar file |
168 (new File(destJar.toString())).setLastModified(System.currentTimeMillis() + 2000); |
167 (new File(destJar.toString())).setLastModified(System.currentTimeMillis() + 2000); |
169 // run with the archive and the jar with modified timestamp. |
168 // run with the archive and the jar with modified timestamp. |
170 // It should fail due to timestamp of the jar doesn't match the one |
169 // It should fail due to timestamp of the jar doesn't match the one |
171 // used during dump time. |
170 // used during dump time. |
172 TestCommon.run("-Xlog:class+load=trace", |
171 TestCommon.run("-cp", destJar.toString(), |
173 "-cp", destJar.toString(), |
|
174 "--module-path", moduleDir.toString(), |
172 "--module-path", moduleDir.toString(), |
175 "-m", TEST_MODULE1) |
173 "-m", TEST_MODULE1) |
176 .assertAbnormalExit( |
174 .assertAbnormalExit( |
177 "A jar file is not the one used while building the shared archive file:"); |
175 "A jar file is not the one used while building the shared archive file:"); |
178 // create an archive with a non-empty directory in the --module-path. |
176 // create an archive with a non-empty directory in the --module-path. |