RFR: 8375458: Check legal folder of JDK image for unwanted files [v2]

Erik Joelsson erikj at openjdk.org
Wed Jan 21 14:45:37 UTC 2026


On Tue, 20 Jan 2026 19:23:10 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>>> This set of files is expected for OpenJDK builds, but different vendors may be building the JDK under different license agreements and consequently, this set of files will differ. As an example, OracleJDK has the files `LICENSE` and `COPYRIGHT`.
>>> 
>>> I think we can check for the file `LICENSE`. If we are to check for the rest of the upper case files, it needs to be conditional on the LICENSE being GPL.
>> 
>> 
>> Good point !  Can I easily check from the test what kind of license it is ? Or if it is OpenJDK or OracleJDK (or a licensee JDK) ?
>
> I would suggest checking the LICENSE file as you find it. If the first line is the below, then it's a GPL licensed build.
> 
> 
> The GNU General Public License (GPL)

At least the OracleJDK also has the file COPYRIGHT. I don't think this open test should verify that, but it also can't make assumptions on what files aren't allowed in non GPL builds.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29272#discussion_r2712885789


More information about the build-dev mailing list