Skip to content

compileMain24Java fails with JDK25+ #14782

Closed
@dweiss

Description

@dweiss

Update: JDK bug - https://bugs.openjdk.org/browse/JDK-8359596

Policeman jenkins complains when compiling against new Java versions, for example:

./gradlew compileMain24Java -Pruntime.java.home=/jdks/jdk-25+27 --rerun-tasks

the problem is this:

warning: [options] location of system modules is not set in conjunction with -source 24
  not setting the location of system modules may lead to class files that cannot run on JDK 24
    --release 24 is recommended instead of -source 24 -target 24 because it sets the location of system modules automatically
error: warnings found and -Werror specified

but we do set:

-Xlint:-options

so I'm not sure why this warning is even triggered. We also can't use --release because we do some other tweaks to java.base in lucene.java.core.mrjar.gradle.

I added a temporary hack to not use -Werror on runtime java jdk25+.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions