Skip to content

Commit

Permalink
Upgraded OpenJDK tot 21.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjanssen committed Oct 22, 2023
1 parent c8ddb55 commit 414f618
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OpenJDK/openjdk.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>openjdk</id>
<version>21.0.0</version>
<version>21.0.1</version>
<packageSourceUrl>https://github.com/johanjanssen/ChocolateyPackages/tree/master/OpenJDK</packageSourceUrl>
<title>OpenJDK</title>
<authors>Oracle</authors>
Expand Down
2 changes: 1 addition & 1 deletion OpenJDK/tools/chocolateyBeforeModify.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$programFiles = (${env:ProgramFiles}, ${env:ProgramFiles(x86)} -ne $null)[0]
$installDir = "$programFiles\OpenJDK"

$pathToUnInstall = "$installDir\jdk-21\bin"
$pathToUnInstall = "$installDir\jdk-21.0.1\bin"

$statementTerminator = ";"

Expand Down
8 changes: 4 additions & 4 deletions OpenJDK/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ $installDir = "$programFiles\OpenJDK"
$packageArgs = @{
PackageName = $env:ChocolateyPackageName
UnzipLocation = $targetDir = $installDir
Url64 = 'https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_windows-x64_bin.zip'
Checksum64 = '5434faaf029e66e7ce6e75770ca384de476750984a7d2881ef7686894c4b4944'
Url64 = 'https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1_windows-x64_bin.zip'
Checksum64 = '77ea464f4fa7cbcbffe0124af44707e8e5ad8c1ce2373f1d94a64d9b20ba0c69'
ChecksumType64 = 'sha256'
}

Install-ChocolateyZipPackage @packageArgs
Install-ChocolateyEnvironmentVariable 'JAVA_HOME' $targetDir\jdk-21 'Machine'
Install-ChocolateyEnvironmentVariable 'JAVA_HOME' $targetDir\jdk-21.0.1 'Machine'
# The full path instead of the %JAVA_HOME% is needed so it can be removed with the Chocolatey Uninstall
Install-ChocolateyPath $targetDir\jdk-21\bin -PathType 'Machine'
Install-ChocolateyPath $targetDir\jdk-21.0.1\bin -PathType 'Machine'
2 changes: 1 addition & 1 deletion OpenJDK/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
$installDir = "$programFiles\OpenJDK"

Uninstall-ChocolateyEnvironmentVariable 'JAVA_HOME' 'Machine'
rm -r "$installDir\jdk-21"
rm -r "$installDir\jdk-21.0.1"

0 comments on commit 414f618

Please sign in to comment.