Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

21

Downloads of v 21.0.4:

21

Last Update:

01 Dec 2024

Package Maintainer(s):

Software Author(s):

  • Oracle

Tags:

Oracle JDK 21

Downloads:

21

Downloads of v 21.0.4:

21

Maintainer(s):

Software Author(s):

  • Oracle

Oracle JDK 21

Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by Oracle. The inclusion of Oracle trademark(s), if any, upon this webpage is solely to identify Oracle goods or services and not for commercial purposes.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Resulted in ScannerExempted

Details
WARNING

This package was rejected on 16 Jan 2025. The reviewer chocolatey-ops has listed the following reason(s):

adrianogba (maintainer) on 29 Nov 2024 05:52:38 +00:00:

User 'adrianogba' (maintainer) submitted package.

chocolatey-ops (reviewer) on 29 Nov 2024 06:24:57 +00:00:

oracle-jdk21 has failed automated validation.

Requirements

Requirements represent the minimum quality of a package that is acceptable. When a package version has failed requirements, the package version requires fixing and/or response by the maintainer. Provided a Requirement has flagged correctly, it must be fixed before the package version can be approved. The exact same version should be uploaded during moderation review.

  • The package contains source control ignore files (.gitignore, .hgignore). Please remove all source control ignore files from the package. More...
  • The package contains internal .git, .hg, or .svn folder. Please remove all version control items from the package. More...
Guidelines

Guidelines are strong suggestions that improve the quality of a package version. These are considered something to fix for next time to increase the quality of the package. Over time Guidelines can become Requirements. A package version can be approved without addressing Guideline comments but will reduce the quality of the package.

  • The iconUrl should be added if there is one. Please correct this in the nuspec, if applicable. More...
  • Release Notes (releaseNotes) are a short description of changes in each version of a package. Please include releasenotes in the nuspec. NOTE: To prevent the need to continually update this field, providing a URL to an external list of Release Notes is perfectly acceptable. More...
Suggestions

Suggestions are either newly introduced items that will later become Guidelines or items that are don't carry enough weight to become a Guideline. Either way they should be considered. A package version can be approved without addressing Suggestion comments.

  • Installation Scripts should avoid using Get-WmiObject for finding software install information. More...
Notes

Notes typically flag things for both you and the reviewer to go over. Sometimes this is the use of things that may or may not be necessary given the constraints of what you are trying to do and/or are harder for automation to flag for other reasons. Items found in Notes might be Requirements depending on the context. A package version can be approved without addressing Note comments.

  • Package automation scripts make use of msiexec. The reviewer will ensure there is a valid reason the package has not used the built-in helpers. More...

adrianogba (maintainer) on 01 Dec 2024 16:54:26 +00:00:

User 'adrianogba' (maintainer) submitted package.

chocolatey-ops (reviewer) on 01 Dec 2024 17:29:15 +00:00:

oracle-jdk21 has passed automated validation. It may have or may still fail other checks like testing (verification).
NOTE: No required changes that the validator checks have been flagged! It is appreciated if you fix other items, but only Requirements will hold up a package version from approval. A human review could still turn up issues a computer may not easily find.

Guidelines

Guidelines are strong suggestions that improve the quality of a package version. These are considered something to fix for next time to increase the quality of the package. Over time Guidelines can become Requirements. A package version can be approved without addressing Guideline comments but will reduce the quality of the package.

  • The iconUrl should be added if there is one. Please correct this in the nuspec, if applicable. More...
  • Release Notes (releaseNotes) are a short description of changes in each version of a package. Please include releasenotes in the nuspec. NOTE: To prevent the need to continually update this field, providing a URL to an external list of Release Notes is perfectly acceptable. More...
Suggestions

Suggestions are either newly introduced items that will later become Guidelines or items that are don't carry enough weight to become a Guideline. Either way they should be considered. A package version can be approved without addressing Suggestion comments.

  • Installation Scripts should avoid using Get-WmiObject for finding software install information. More...
Notes

Notes typically flag things for both you and the reviewer to go over. Sometimes this is the use of things that may or may not be necessary given the constraints of what you are trying to do and/or are harder for automation to flag for other reasons. Items found in Notes might be Requirements depending on the context. A package version can be approved without addressing Note comments.

  • Package automation scripts make use of msiexec. The reviewer will ensure there is a valid reason the package has not used the built-in helpers. More...

chocolatey-ops (reviewer) on 01 Dec 2024 17:46:20 +00:00:

oracle-jdk21 has passed automated package testing (verification). The next step in the process is package scanning.
Please visit https://gist.github.com/choco-bot/e68a16b47cd9bd2488c48b48f2f1fd3b for details.
This is an FYI only. There is no action you need to take.

chocolatey-ops (reviewer) on 01 Dec 2024 17:58:57 +00:00:

oracle-jdk21 has passed automated virus scanning, however requires human verification.
Package Scan Status Type was ScannerExempted.

Package downloads file(s) with text content!

Check the virus scan results for additional information.

The package scanner had problems with the following files:

  • jdk-21.0.4_windows-x64_bin.msi: File is text. Contents:
    C:\tools\scanner\filesToScan\oracle-jdk21\21.0.4\x64\jdk-21.0.4_windows-x64_bin.msi has content type text/plain

flcdrg (reviewer) on 12 Dec 2024 11:09:36 +00:00:

Have you tried letting Chocolatey do the uninstall of the JDK msi? I note that other JDK packages don't seem to need call msiexec to do uninstall.

https://community.chocolatey.org/packages/oracle17jdk
https://community.chocolatey.org/packages/jdk20

david

chocolatey-ops (reviewer) on 01 Jan 2025 11:10:34 +00:00:

We've found oracle-jdk21 v21.0.4 in a submitted status and waiting for your next actions. It has had no updates for 20 or more days since a reviewer has asked for corrections. Please note that if there is no response or fix of the package within 15 days of this message, this package version will automatically be closed (rejected) due to being stale.

Take action:

  • Log in to the site and respond to the review comments.
  • Resubmit fixes for this version.
  • If the package version is failing automated checks, you can self-reject the package.

If your package is failing automated testing, you can use the chocolatey test environment to manually run the verification and determine what may need to be fixed.

Note: We don't like to see packages automatically rejected. It doesn't mean that we don't value your contributions, just that we can not continue to hold packages versions in a waiting status that have possibly been abandoned. If you don't believe you will be able to fix up this version of the package within 15 days, we strongly urge you to log in to the site and respond to the review comments until you are able to.

chocolatey-ops (reviewer) on 16 Jan 2025 11:11:45 +00:00:

Unfortunately there has not been progress to move oracle-jdk21 v21.0.4 towards an approved status within 15 days after the last review message, so we need to close (reject) the package version at this time. If you want to pick this version up and move it towards approval in the future, use the contact site admins link on the package page and we can move it back into a submitted status so you can submit updates.

Status Change - Changed status of package from 'submitted' to 'rejected'.

Description

Oracle JDK is a distribution of OpenJDK provided by Oracle. This package automates the download and installation of Oracle JDK 21 from Oracle's official website.


tools\chocolateyinstall.ps1
#Write-Host "This installation is subject to the Oracle Technology Network License Agreement for Oracle Java SE."
#Write-Host "Permitted uses include personal and development use at no cost."
#Write-Host "Other uses may require a commercial license."
#Write-Host "Review the terms at: https://www.oracle.com/downloads/licenses/java-se-license.html"
#Write-Host "By continuing, you agree to these terms."

$packageArgs = @{
  PackageName = $env:ChocolateyPackageName
  Url64bit = 'https://download.oracle.com/java/21/archive/jdk-21.0.4_windows-x64_bin.msi'
  Checksum64 = 'fa4e050a8535a581560ba19bd933caeb56730b5c3936180f3eb36cf0d69286af'
  ChecksumType64 = 'sha256'
  fileType      = 'msi'
  silentArgs    = "INSTALLLEVEL=3 /quiet"
}

Install-ChocolateyPackage @packageArgs

# Set JAVA_HOME
$jdkInstallPath = "C:\Program Files\Java\jdk-21"
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", $jdkInstallPath, [System.EnvironmentVariableTarget]::Machine)

# Update PATH
$path = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)
$newPath = "$path;$($jdkInstallPath)\bin"
[System.Environment]::SetEnvironmentVariable("Path", $newPath, [System.EnvironmentVariableTarget]::Machine)

Write-Host "JAVA_HOME set to $jdkInstallPath and added to PATH."
tools\chocolateyuninstall.ps1
# Get ProductCode (GUID) of Oracle JDK 21
$jdkProductCode = (Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "Java SE Development Kit 21*" }).IdentifyingNumber

if ($jdkProductCode) {
    # Uninstall JDK
    Write-Host "Uninstalling Oracle JDK 21..."
    Start-Process -FilePath "msiexec.exe" -ArgumentList "/x $jdkProductCode /quiet /norestart" -Wait
    Write-Host "Oracle JDK 21 uninstalled successfully."
} else {
    Write-Warning "Oracle JDK 21 not found. Skipping uninstallation."
}

# Remove JAVA_HOME environment variable
Write-Host "Removing JAVA_HOME environment variable..."
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", $null, [System.EnvironmentVariableTarget]::Machine)

# Remove JAVA_HOME\bin from PATH
Write-Host "Updating PATH environment variable to remove JAVA_HOME\bin..."
$path = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)
if ($path -match ";C:\\Program Files\\Java\\jdk-21\\bin") {
    $newPath = $path -replace ";C:\\Program Files\\Java\\jdk-21\\bin", ""
    [System.Environment]::SetEnvironmentVariable("Path", $newPath, [System.EnvironmentVariableTarget]::Machine)
    Write-Host "PATH environment variable updated."
} else {
    Write-Warning "JAVA_HOME\bin not found in PATH. Skipping update."
}

Write-Host "Uninstallation script completed."

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status

This package has no dependencies.

Discussion for the Oracle JDK 21 Package

Ground Rules:

  • This discussion is only about Oracle JDK 21 and the Oracle JDK 21 package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Oracle JDK 21, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus