Notices: This section not yet converted to new layout. Download stats are rolling back out.

This is not the latest version of Java SE Runtime Environment available.

Java SE Runtime Environment

8.0.40

There are no package test results for this package

This package was approved by moderator purity on 3/24/2015.

By default this package installs JRE according to your platform (x86 or x64).

If you want to install 32bits JRE on 64bits OS

choco install jre8 -params "x64=false"

or

choco install jre8 -params "i586=true"

if you install by

choco install jre8 -params "both=true"

then, both 32bits and 64bits JRE will be installed and 64bits will be defaults.

After you install version 8.0.40, when you want to upgrade JRE after version 8.0.40, you have only

choco upgrade jre8

-params will be passed down to next version by Environment $env:JRE_PLATFORM.

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

C:\> choco install jre8 --version 8.0.40

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

C:\> choco upgrade jre8 --version 8.0.40

Files

Hide
  • tools\chocolateyInstall.ps1 Show
    $script_path = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
    $common = $(Join-Path $script_path "common.ps1")
    . $common
    
    #installs jre8
    
    $params = "$env:chocolateyPackageParameters" # -params '"x64=false;path=c:\\java\\jre"'
    $params = (ConvertFrom-StringData $params.Replace(";", "`n")) 
    
    remove-platform-files    
    if (check-both($params)) {
        chocolatey-install $true
        chocolatey-install
        out-both($params)
    } else {
        out-i586($params)
        chocolatey-install
    }  
     
    
  • tools\chocolateyUninstall.ps1 Show
    $script_path = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
    $common = $(Join-Path $script_path "common.ps1")
    . $common
    
    
    function Uninstall-JRE {
        if (Test-Path (Join-Path $script_path "both.txt")) {
            $jre = "/qn /x {26A24AE4-039D-4CA4-87B4-2F864" + $uninstall_id + "F0}"
            Start-ChocolateyProcessAsAdmin $jre 'msiexec'
            $jre = "/qn /x {26A24AE4-039D-4CA4-87B4-2F832" + $uninstall_id + "F0}"
            Start-ChocolateyProcessAsAdmin $jre 'msiexec'
        } else {
            $use64bit = use64bit
            if ($use64bit) {
                $jre = "/qn /x {26A24AE4-039D-4CA4-87B4-2F864" + $uninstall_id + "F0}"   
            } else {
                $jre = "/qn /x {26A24AE4-039D-4CA4-87B4-2F832" + $uninstall_id + "F0}"   
            }
            Start-ChocolateyProcessAsAdmin $jre 'msiexec'
        }
    }
    try {  
        Uninstall-JRE
    } catch {
        # ingore exception
    }
  • tools\common.ps1 Show
    $jre_version = '8u40' 
    $uninstall_id = "18040" 
    $script_path = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
    
    function use64bit($Forcei586 = $false) {
        if ($Forcei586) {
            return $false
        }
        if (Test-Path (Join-Path $script_path "i586.txt")) {
            return $false
        }
        $is64bitOS = Get-ProcessorBits 64
        return $is64bitOS
    }
    
    function has_file($filename) {
        return Test-Path $filename
    }
    
    function download-from-oracle($url, $output_filename) {
        if (-not (has_file($output_fileName))) {
            Write-Host  "Downloading jre from $url"
    
            Get-ChocolateyWebFile 'jre8' $output_fileName $url $url
        }  
    }
    
    function download-jre-file($url, $output_filename) {
        $dummy = download-from-oracle $url $output_filename
    }
    
    function download-jre($Forcei586 = $false) {
        $arch = get-arch $Forcei586
        $filename = "jre-$jre_version-windows-$arch.exe"
        if ($arch -eq "x64") {
           $bundleId = "104768"
        } else {
           $bundleId = "104766"
        }
        $url = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=$bundleId"
        $output_filename = Join-Path $script_path $filename
    
        $dummy = download-jre-file $url $output_filename
    
        return $output_filename
    }
    
    
    function get-arch($Forcei586 = $false) {
        if((use64bit $Forcei586)) {
            return "x64"
        } else {
            return "i586"
        }
    }
    
    function chocolatey-install($Forcei586 = $false) {
        $jre_file = download-jre $Forcei586
        $arch = get-arch $Forcei586
    
        Write-Host "Installing jre $jre_version($arch) to $java_home"
        Install-ChocolateyInstallPackage 'jre8' 'exe' "/s" $jre_file          
    
        Update-SessionEnvironment
    }
    
    function out-i586($params) {
        $jre_platform = Get-EnvironmentVariable 'JRE_PLATFORM' 'MACHINE'
        if ($params.i586 -eq $true -or $params.x64 -eq $false -or 'i586' -eq $jre_platform) {
            Out-File (Join-Path $script_path "i586.txt")
            Install-ChocolateyEnvironmentVariable 'JRE_PLATFORM' 'i586' 'Machine'
        }
    }
    
    function check-both($params) {
        $jre_platform = Get-EnvironmentVariable 'JRE_PLATFORM' 'MACHINE' 
        if ((($params.both -eq $true) -and (use64bit)) -or ('both' -eq $jre_platform)) {
            return $true
        }
    }
    
    function out-both($params) {
        if (check-both($params)) {
                Out-File (Join-Path $script_path "both.txt")
                Install-ChocolateyEnvironmentVariable 'JRE_PLATFORM' 'both' 'Machine'
        }
    }
    
    function remove-platform-files {
        if (Test-Path (Join-Path $script_path "i586.txt")) {
            Remove-Item (Join-Path $script_path "i586.txt")
        }
        if (Test-Path (Join-Path $script_path "both.txt")) {
            Remove-Item (Join-Path $script_path "both.txt")
        }
    }

Virus Scan Results

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.

Dependencies

This package has no dependencies.

Package Maintainer(s)

Software Author(s)

  • Sun Microsystems/Oracle Corporation

Tags

Version History

Version Downloads Last updated Status
Java SE Runtime Environment 8.0.191 142181 Saturday, November 10, 2018 approved
Java SE Runtime Environment 8.0.181 1092568 Wednesday, July 25, 2018 approved
Java SE Runtime Environment 8.0.171 685691 Monday, April 30, 2018 approved
Java SE Runtime Environment 8.0.161 1282704 Tuesday, January 23, 2018 approved
Java SE Runtime Environment 8.0.151 824118 Friday, October 27, 2017 approved
Java SE Runtime Environment 8.0.144 658787 Friday, August 11, 2017 approved
Java SE Runtime Environment 8.0.141 214450 Thursday, July 20, 2017 approved
Java SE Runtime Environment 8.0.131 653874 Friday, April 28, 2017 approved
Java SE Runtime Environment 8.0.121 532624 Thursday, February 2, 2017 approved
Show More

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
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok