RFR: 8293910: tools/launcher/FXLauncherTest.java fail with jfx [v2]
Leslie Zhai
lzhai at openjdk.org
Wed Sep 21 08:00:44 UTC 2022
On Wed, 21 Sep 2022 07:56:27 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hi @AlanBateman
>>
>> Debug patch:
>>
>>
>> diff --git a/test/jdk/tools/launcher/FXLauncherTest.java b/test/jdk/tools/launcher/FXLauncherTest.java
>> index 9cc4b5aea98..33c3e2788ad 100644
>> --- a/test/jdk/tools/launcher/FXLauncherTest.java
>> +++ b/test/jdk/tools/launcher/FXLauncherTest.java
>> @@ -223,7 +223,7 @@ public class FXLauncherTest extends TestHelper {
>> compileFXModule();
>>
>> List<String> fxCompilerArgs = new ArrayList<>();
>> - fxCompilerArgs.add("--module-path=" + MODULE_DIR);
>> + fxCompilerArgs.add("--upgrade-module-path=" + MODULE_DIR);
>> fxCompilerArgs.add("--add-modules=javafx.graphics");
>> fxCompilerArgs.addAll(Arrays.asList(compilerArgs));
>> compile(fxCompilerArgs.toArray(new String[fxCompilerArgs.size()]));
>> @@ -232,7 +232,7 @@ public class FXLauncherTest extends TestHelper {
>> static TestResult doFxExec(String...cmds) {
>> List<String> fxCmds = new ArrayList<>();
>> fxCmds.addAll(Arrays.asList(cmds));
>> - fxCmds.add(1, "--module-path=" + MODULE_DIR);
>> + fxCmds.add(1, "--upgrade-module-path=" + MODULE_DIR);
>> fxCmds.add(2, "--add-modules=javafx.graphics");
>> return doExec(fxCmds.toArray(new String[fxCmds.size()]));
>> }
>> @@ -439,18 +439,6 @@ public class FXLauncherTest extends TestHelper {
>> }
>>
>> public static void main(String... args) throws Exception {
>> -
>> - // Ensure that FX is not part of jdk
>> - Class<?> fxClass = null;
>> - try {
>> - fxClass = Class.forName(FX_MARKER_CLASS);
>> - } catch (ClassNotFoundException ex) {
>> - // do nothing
>> - }
>> - if (fxClass != null) {
>> - throw new RuntimeException("JavaFX modules erroneously included in the JDK");
>> - }
>> -
>> FXLauncherTest fxt = new FXLauncherTest();
>> fxt.run(args);
>> if (testExitValue > 0) {
>>
>>
>> Still failed: [debug.log](https://github.com/openjdk/jdk/files/9614161/debug.log)
>>
>> Thanks,
>> Leslie Zhai
>
>> Still failed: [debug.log](https://github.com/openjdk/jdk/files/9614161/debug.log)
>
> You are running into module hashes now so I think you'll need some of JDK-8294093. In make/common/Modules.gmk ReadSingleImportMetaData can you add
>
> UPGRADEABLE_PLATFORM_MODULES += $1
>
> This will add the names of the imported modules to the list of upgradeable modules and should mean they are not hashed.
Hi @AlanBateman
> I've created JDK-8294093 to track changing ReadSingleImportMetaData (in Modules.gmk) to ignore the mapping in build.properties
Thanks for your report!
So 8293977: jdk/modules/etc/VerifyModuleDelegation.java fail with jfx could be fixed too.
> --with-import-modules option was used in JDK 9/10 for co-bundling JavaFX with the JDK. It seems this configure option is still in use, by some.
Yes, @dumasun use it :)
Thanks,
Leslie Zhai
-------------
PR: https://git.openjdk.org/jdk/pull/10299
More information about the core-libs-dev
mailing list