Downloads:

1,027

Downloads of v 6.0.43:

993

Last Update:

03 Oct 2019

Package Maintainer(s):

Software Author(s):

  • Oracle

Tags:

java runtime environment

Java SE Runtime Environment

6.0.43 | Updated: 03 Oct 2019

Downloads:

1,027

Downloads of v 6.0.43:

993

Maintainer(s):

Software Author(s):

  • Oracle

Java SE Runtime Environment 6.0.43

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install Java SE Runtime Environment, run the following command from the command line or from PowerShell:

>

To upgrade Java SE Runtime Environment, run the following command from the command line or from PowerShell:

>

To uninstall Java SE Runtime Environment, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade jre6 -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade jre6 -y --source="'STEP 3 URL'"
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure jre6 installed
  win_chocolatey:
    name: jre6
    state: present
    version: 6.0.43
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'jre6' do
  action    :install
  version  '6.0.43'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: jre6,
    Version: 6.0.43,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller jre6
{
   Name     = 'jre6'
   Ensure   = 'Present'
   Version  = '6.0.43'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'jre6':
  provider => 'chocolatey',
  ensure   => '6.0.43',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install jre6 version="6.0.43" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator flcdrg on 06 Oct 2019.

Description

Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images in 3D, just to name a few. It's also integral to the intranet applications and other e-business solutions that are the foundation of corporate computing. Please note you now need a Java License from Oracle to use unless installed for Personal Use and Development Use.

Note

This package installs the Java version offered at https://www.java.com. It also sets SPONSORS=0 (see docs).

If you wish to only install the 32-bit version of Java use the /exclude parameter. The switch to exclude 32-bit is /exclude:32 and to exclude 64-bit /exclude:64
For example: choco install jre8 -PackageParameters "/exclude:64" -y
This package no longer manually adds an environment variable.
x86 installs of Windows you can expect to see an error while reading the registry, but the script will still function normally.

This package can install 32-bit, 64-bit, or both versions.


tools\chocolateyinstall.ps1
$ErrorActionPreference = 'Stop'; # stop on all errors
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$fileLocation = ''
$url        = 'https://javadl.sun.com/webapps/download/AutoDL?BundleId=75085'
$checksum32 = '18A29EB53F168C6EE153FD9767A2505C8667700E910A40BFBC491B54FE71BF2F'
$url64      = 'https://javadl.sun.com/webapps/download/AutoDL?BundleId=75086'
$checksum64 = '1F96DBF3082FC7CD004719CCB63D1B46A5683AECAFD3BC28EAE7B9A7A240C811'
$installArgs = "/s REBOOT=0 SPONSORS=0 AUTO_UPDATE=0 $32dir"
$installArgs64 = "/s REBOOT=0 SPONSORS=0 AUTO_UPDATE=0 $64dir"
$softwareName = 'Java(TM) 6*'
$version = '6.0.430.1'
$packageName = 'JRE6'
$osBitness = Get-ProcessorBits
$cachepath = "$env:temp\$packagename\$version"

Write-Output "Checking to see if local install is already up to date..."
try{
  $checkreg64 = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion | Where-Object { $_.DisplayName -like "$softwareName" -and ([Version]$_.DisplayVersion) -eq $version} -ErrorAction SilentlyContinue
  $checkreg32 = Get-ItemProperty HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion | Where-Object { $_.DisplayName -like "$softwareName" -and ([Version]$_.DisplayVersion) -eq $version} -ErrorAction SilentlyContinue
}catch{
  Write-Output "Registry check failed. This is commonly caused by corrupt keys (Do you have netbeans installed?)"
}

# Checks if JRE 32/64-bit in the same version is already installed and if the user excluded 32-bit Java.
# Otherwise it downloads and installs it.
# This is to avoid unnecessary downloads and 1603 errors.
if ($checkreg32 -ne $null) 
{
  Write-Output "Java Runtime Environment $version (32-bit) is already installed. Skipping download and installation"
} 
elseif ($exclude -ne "32") 
{
  Write-Output "Downloading 32-bit installer"
  Get-ChocolateyWebFile -packageName $packageName -fileFullPath "$cachepath\JRE6x86.exe" -url $url -checksum $checksum32 -checksumType 'SHA256'
  Write-Output "Installing JRE $version 32-bit"
  Install-ChocolateyInstallPackage -packageName $packageName -fileType $installerType -silentArgs $installArgs -file "$cachepath\JRE6x86.exe"
} 
else 
{
  Write-Output "Java Runtime Environment $Version (32-bit) excluded for installation"
}

# Only check for the 64-bit version if the system is 64-bit

if ($osBitness -eq 64) 
{
  if ($checkreg64 -ne $null) 
  {
    Write-Output "Java Runtime Environment $version (64-bit) is already installed. Skipping download and installation"
  } 
  elseif ($exclude -ne "64") 
  {
    Write-Output "Downloading 64-bit installer"
    Get-ChocolateyWebFile -packageName $packageName -fileFullPath "$cachepath\JRE6x64.exe" -url64 $url64 -checksum64 $checksum64 -checksumType 'SHA256'
    Write-Output "Installing JRE $version 64-bit"
    Install-ChocolateyInstallPackage -packageName $packageName -fileType $installerType -silentArgs $installArgs -file64 "$cachepath\JRE6x64.exe"
  } 
  else 
  {
    Write-Output "Java Runtime Environment $Version (64-bit) excluded for installation"
  }
}

tools\chocolateyuninstall.ps1
Write-Debug ("Starting " + $MyInvocation.MyCommand.Definition)

$scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)


[string]$packageName="JRE6"
$version = '1.6.0.43'
#$thisJreInstalledHash = thisJreInstalled($version)
  $checkreg64 = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, PSChildName | Where-Object { $_.DisplayName -like '*Java(TM) 6*' -and ([Version]$_.DisplayVersion) -eq $version} -ErrorAction SilentlyContinue
  $checkreg32 = Get-ItemProperty HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, PSChildName | Where-Object { $_.DisplayName -like '*Java(TM) 6*' -and ([Version]$_.DisplayVersion) -eq $version} -ErrorAction SilentlyContinue
  $osBitness = Get-ProcessorBits
<#
Exit Codes:
    0: Java installed successfully.
    1605: Java is not installed.
    3010: A reboot is required to finish the install.
#>

  if($checkreg32 -ne $null) 
  {
     Write-Warning "Uninstalling JRE version $Version 32bit"
     $32 = $checkreg32.PSChildName
     Start-ChocolateyProcessAsAdmin "/qn /norestart /X$32" -exeToRun "msiexec.exe" -validExitCodes @(0,1605,3010)
  }
  if($checkreg64 -ne $null)
  {
     Write-Warning "Uninstalling JRE version $Version $osBitness bit" #Formatted weird for x86 windows installs
     $64 = $checkreg64.PSChildName
     Start-ChocolateyProcessAsAdmin "/qn /norestart /X$64" -exeToRun "msiexec.exe" -validExitCodes @(0,1605,3010)
  }

Write-Warning "$packageName may require a reboot to complete the uninstallation."

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.

Version Downloads Last Updated Status

This package has no dependencies.

Discussion for the Java SE Runtime Environment Package

Ground Rules:

  • This discussion is only about Java SE Runtime Environment and the Java SE Runtime Environment 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 Java SE Runtime Environment, 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