@@ -10,16 +10,22 @@ $packageName = $env:ChocolateyPackageName
10
10
$url = ' http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip'
11
11
$sha256 = ' f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59'
12
12
13
+ Write-Host " testtesttest22222"
14
+
13
15
$javaRegistryKeyName = if ($packageName -like ' jre*' ) {' Java Runtime Environment' } else {' Java Development Kit' }
14
16
$javaHome = (Get-ItemProperty - Path " HKLM:\SOFTWARE\JavaSoft\$javaRegistryKeyName \1.8" - Name JavaHome).JavaHome
15
17
$jreHome = if ($packageName -like ' jre*' ) {$javaHome } else {" $javaHome \jre" }
16
18
$installPath = " $jreHome \lib\security"
17
19
$tempPath = " $env: TEMP \$packageName "
18
20
$artifactPath = " $tempPath \$ ( Split-Path - Leaf $url ) "
19
21
22
+ Write-Host " testtesttest33333"
23
+
20
24
mkdir $tempPath - ErrorAction SilentlyContinue | Out-Null
21
25
$webSession = New-Object Microsoft.PowerShell.Commands.WebRequestSession
22
26
$webSession.Cookies.Add ((New-Object System.Net.Cookie ' oraclelicense' , ' accept-securebackup-cookie' , ' /' , ' .oracle.com' ))
27
+
28
+ Write-Host " testtesttest44444"
23
29
Invoke-WebRequest `
24
30
$url `
25
31
- UseBasicParsing `
@@ -31,10 +37,10 @@ if ($sha256 -ne $actualSha256) {
31
37
}
32
38
Add-Type - AssemblyName System.IO.Compression.FileSystem
33
39
[IO.Compression.ZipFile ]::ExtractToDirectory($artifactPath , $tempPath )
34
-
40
+ Write-Host " testtesttest55555 "
35
41
Copy-Item " $tempPath \UnlimitedJCEPolicyJDK8\*.jar" $installPath
36
42
37
43
Remove-Item - Recurse $tempPath \*
38
44
Remove-Item $tempPath
39
45
40
- Write-Host " testtesttest22222 "
46
+
0 commit comments