Skip to content

Allow differentiating Zulu releases with/without CRaC #636

Description

@guilgaly

Description:

Currently, if I specify the following options:

distribution: 'zulu'
java-version: '21'

Then actions/setup-java will download zulu21.34.19-ca-crac-jdk21.0.3-linux_x64.tar.gz. Notice that this is the build with the optional CRaC feature (-crac in the name) rather than the default build (zulu21.34.19-ca-jdk21.0.3-linux_x64.tar.gz). Not necessarily a big deal, but weird since this is an optional feature rather than the default Zulu build. This doesn't seem intentional, rather it just happens because the -crac version ends up being first in the list.

I investigated a bit, and setup-java uses the https://api.azul.com/zulu/download/community/v1.0/bundles/ API, which does not seem to offer the ability to filter out CRaC builds. Azul recommends migrating to the newer https://api.azul.com/metadata/v1/zulu/packages/ API (see the migration guide), which does have such a filter.

After a few tests with the Swagger UI for the new API, here's the queries I would probably expect (assuming Linux x64 and java-version: '21' for this example):

  • java-package: 'jdk' (or the default): https://api.azul.com/metadata/v1/zulu/packages/?java_version=21&os=linux-glibc&arch=x64&archive_type=tar.gz&java_package_type=jdk&latest=true&release_status=ga&availability_types=ca&certifications=tck&javafx_bundled=false&crac_supported=false
  • java-package: 'jdk+fx': https://api.azul.com/metadata/v1/zulu/packages/?java_version=21&os=linux-glibc&arch=x64&archive_type=tar.gz&java_package_type=jdk&latest=true&release_status=ga&availability_types=ca&certifications=tck&javafx_bundled=true&crac_supported=false
  • java-package: 'jdk+crac': https://api.azul.com/metadata/v1/zulu/packages/?java_version=21&os=linux-glibc&arch=x64&archive_type=tar.gz&java_package_type=jdk&latest=true&release_status=ga&availability_types=ca&certifications=tck&javafx_bundled=false&crac_supported=true
  • Azul doesn't seem to offer packages with both JavaFX and CRaC at the same time.

What do you think?

Justification:

  • The optional inclusion of CRaC should be treated like the optional bundling of JavaFX (i.e. an option but not the default).
  • AFAICT, this requires migrating to Azul's new API, but that's what they recommend anyway.

Note that I don't know of any specific issue with using the -crac build when it's not needed, so it would be more for the principle of intentionally selecting the type of build used rather than just getting whichever one happens to be first in the list.

Are you willing to submit a PR?

I can probably try, it doesn't seem too complicated - but no guarantee that I would have the time right away.

Activity

  1. v-aparnajyothi-y commented on Jun 5, 2024

    @v-aparnajyothi-y
    Contributor

    Hello @guilgaly, Thank you for creating this issue and we will get back to you once we have some feedback on this :)

  2. bwRavencl commented on Aug 26, 2024

    @bwRavencl

    I ran into this issue while experimenting with CDS. I noticed that the JDK installed via setup-java is not the same as the one I am running on my local machine, because the CDS archives are not interchangeable between different JDKs.

    The current behavior is in not really deterministic when it depends on the order of the list returned by Azul's API.
    For me it is important to rely on setup-java to install the exact same JDK build I use locally for development.

    By default the non-CRaC build is what people would expect to be installed, since CRaC is an optional feature as @guilgaly pointed out.

    Is there any short-term workaround to ensure that the non-CRaC build is installed until this is fixed?
    Edit: My quick and dirty workaround

  3. jixxed commented on Mar 21, 2026

    @jixxed

    what a nightmare this was. Got a false positive in virustotal on a simengine.exe that was part of my releases. Trying to figure out what this executable even was for, I could not find it in my local builds or in the local JDK's. I could not imagine the github runners were compromised is some way. Spent hours trying to figure out where the file came from, only to find out it was part of this specialized CRaC version.

    Please save others this nightmare and implement this!

  4. nbauma109 commented on Apr 3, 2026

    @nbauma109

    what a nightmare this was. Got a false positive in virustotal on a simengine.exe that was part of my releases. Trying to figure out what this executable even was for, I could not find it in my local builds or in the local JDK's. I could not imagine the github runners were compromised is some way. Spent hours trying to figure out where the file came from, only to find out it was part of this specialized CRaC version.

    Please save others this nightmare and implement this!

    I have the same issue, did you find how that simengine.exe got there ? I can't find it in the JDK distributions.

  5. jixxed commented on Apr 3, 2026

    @jixxed

    I have the same issue, did you find how that simengine.exe got there ? I can't find it in the JDK distributions.

    It is part of the CRaC version

  6. brunoborges commented on Jun 23, 2026

    @brunoborges
    Contributor

    Update: this is addressed by PR #1010 (migration to the Azul Metadata API). The new API call sends crac_supported explicitly — for a plain distribution: zulu / java-version: 21 it now requests the non-CRaC build by default, and CRaC builds are selected via the +crac package type. That resolves the unexpected-CRaC behavior reported here. Keeping this open as the tracking issue; it should close when #1010 merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    distributionJDK distribution/version/source supportfeature requestNew feature or request to improve the current logic

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo