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:

241,521

Downloads of v 7.0.79:

6,758

Last Update:

14 Apr 2015

Package Maintainer(s):

Software Author(s):

  • Oracle

Tags:

java runtime environment

Java Runtime (JRE)

This is not the latest version of Java Runtime (JRE) available.

  • 1
  • 2
  • 3

7.0.79 | Updated: 14 Apr 2015

Downloads:

241,521

Downloads of v 7.0.79:

6,758

Software Author(s):

  • Oracle

Java Runtime (JRE) 7.0.79

This is not the latest version of Java Runtime (JRE) available.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Unknown


Verification Testing Passed

Details

Scan Testing Successful:

No detections found in any package files

Details
Package Approved

This package was approved by moderator ferventcoder on 24 Apr 2015.

WARNING

This package is unlisted and hidden from package listings.

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.

Note

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

If you want Java 8, install the jre8 package instead.

This only installs the Java Runtime with the bitness specific to your OS (either 32- or 64-bit). If you want both 32-bit and 64-bit JREs on your 64-bit OS, install javaruntime instead.


tools\chocolateyInstall.ps1
try {

  $scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
  # Import function to test if JRE in the same version is already installed
  Import-Module (Join-Path $scriptDir 'thisJreInstalled.ps1')

  $packageName = 'javaruntime-platformspecific'
  # Find download URLs at http://www.java.com/en/download/manual.jsp
  $url = 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=106367'
  $url64 = 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=106369'
  $version = '7.0.79'
  $versionMajor = $version -replace '^(\d+)\..*', '$1'
  $installerType = 'exe'
  $installArgs = '/s REBOOT=Suppress SPONSORS=0'

  # If both 32- and 64-bit versions are installed, it adds only the folder
  # of the 64-bit version to the env variables
  $javaHome = Join-Path $env:ProgramFiles "Java\jre$versionMajor"
  $jreForPathVariable = Join-Path $javaHome 'bin'

  $thisJreInstalledHash = thisJreInstalled($version)
  $osBitness = Get-ProcessorBits

  # This is the code for both javaruntime and javaruntime-platformspecific packages.
  # If the package is javaruntime-platformspecific, only install the jre version
  # based on the OS bitness, otherwise install both 32- and 64-bit versions
  if ($packageName -match 'platformspecific') {

    if ($thisJreInstalledHash.x86_32 -or $thisJreInstalledHash.x86_64) {
      Write-Output "Java Runtime Environment $version is already installed. Skipping download and installation to avoid 1603 errors."
    } else {
      Install-ChocolateyPackage $packageName $installerType $installArgs $url $url64
    }

  } else {
    # Otherwise it is the javaruntime package which installs both 32- and 64-bit jre versions on 64-bit systems

    # Checks if JRE 32/64-bit in the same version is already installed,
    # otherwise it downloads and installs it.
    # This is to avoid unnecessary downloads and 1603 errors.
    if ($thisJreInstalledHash.x86_32) {
      Write-Output "Java Runtime Environment $version (32-bit) is already installed. Skipping download and installation"
    } else {
      Install-ChocolateyPackage $packageName $installerType $installArgs $url
    }

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

    if ($osBitness -eq 64) {
      if ($thisJreInstalledHash.x86_64) {
        Write-Output "Java Runtime Environment $version (64-bit) is already installed. Skipping download and installation"
      } else {
        # Here $url64 is used twice to obtain the correct message from Chocolatey
        # that it installed the 64-bit version, otherwise it would display 32-bit,
        # regardless of the actual bitness of the software.
        Install-ChocolateyPackage $packageName $installerType $installArgs $url64 $url64
      }
    }
  }

  # Only set the entry for the PATH variable and the JAVA_HOME env variable
  # if the same version of JRE was not already installed (32- or 64-bit separately)
  if (!($thisJreInstalledHash.x86_32) -or !($thisJreInstalledHash.x86_64)) {

    Install-ChocolateyPath $jreForPathVariable 'Machine'
    Start-ChocolateyProcessAsAdmin @"
[Environment]::SetEnvironmentVariable('JAVA_HOME', '$javaHome', 'Machine')
"@
  }

} catch {
  Write-ChocolateyFailure $packageName $($_.Exception.Message)
  throw
}
tools\thisJreInstalled.ps1
# This function checks if the same version of JRE is already installed on the computer.
# It returns a hash map with a 'x86_32' and 'x86_64'. These values are not empty if the
# same version and bitness of JRE is already installed.
function thisJreInstalled($version) {
  $productSearch = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match '^Java \d+ Update \d+'}

  # The regexes for the name of the JRE registry entries (32- and 64 bit versions)
  $nameRegex32 = '^Java \d+ Update \d+$'
  $nameRegex64 = '^Java \d+ Update \d+ \(64-bit\)$'
  $versionRegex = $('^' + $version + '\d*$')


  return @{
    'x86_32' = $productSearch | Where-Object {$_.Name -match $nameRegex32 -and $_.Version -match $versionRegex}
    'x86_64' = $productSearch | Where-Object {$_.Name -match $nameRegex64 -and $_.Version -match $versionRegex}
  }
}

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
Java Runtime (JRE) 7.0.55.20140520 555 Tuesday, May 20, 2014 Unknown
Java Runtime (JRE) 7.0.55 702 Wednesday, April 16, 2014 Unknown
Java Runtime (JRE) 7.0.51.20140128 751 Tuesday, January 28, 2014 Unknown
Java Runtime (JRE) 7.0.51 690 Tuesday, January 14, 2014 Unknown
Java Runtime (JRE) 7.0.45 607 Friday, November 22, 2013 Unknown

This package has no dependencies.

Discussion for the Java Runtime (JRE) Package

Ground Rules:

  • This discussion is only about Java Runtime (JRE) and the Java Runtime (JRE) 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 Runtime (JRE), 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