Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


java_se (64) Versions 8.201.0

Installs Oracle's Java SE JDK

cookbook 'java_se', '= 8.201.0', :supermarket
cookbook 'java_se', '= 8.201.0'
knife supermarket install java_se
knife supermarket download java_se
Quality 100%

Java SE Cookbook

Cookbook Version

Installs and configures Oracle's
Java SE JDK 8.

See Critical Patch Updates
for next scheduled JDK release.


  • Chef 11+


  • CentOS, Red Hat, Fedora
  • Debian, Ubuntu
  • Mac OS X
  • Windows


By adding java_se to a run list or cookbook you are accepting the
Oracle Binary Code License Agreement for Java SE.

Older versions of Java JDK are no longer publicly available
after a patch update. So it is recommended that you
download JDK from alternative location,
or constrain java_se cookbook version.
Note that the latter solution could result in a failed converge when
a new patch update is released and a matching version of java_se
cookbook is not yet available. A release of java_se cookbook usually
follows within a day after a patch update.

Windows JAVA_HOME and PATH environment variables are not available
during initial chef-client run. Attribute
node['java_se']['win_javalink'] provides a symbolic link to installed
Java JDK bin directory and is available during initial chef-client run.


Download JDK from alternative location

This will download the JDK that best matches platform criteria. Note that JDK file names must be the
same as that found on Oracle's download page.

A script to download JDKs from Oracle and upload them to Amazon S3 is
available here.

  "java_se": {
    "uri": ""

Constrain java_se cookbook version

version in cookbook to latest Java SE JDK 8.

depends 'java_se', '~> 8.0'

Constrain version in
to latest Java SE JDK 8.

cookbook 'java_se', '~> 8.0'


  • node['java_se']['uri'] - The URI to the Java SE JDKs. If a directory is provided, it will then automatically assign a file name that best matches platform criteria. The JDK file names must be the same as that found on Oracle's download page. Leave nil to download directly from Oracle. Default nil.
  • node['java_se']['skip'] - Skips installing Java SE. Default false.
  • node['java_se']['force_i586'] - Install i586 Java on x64 machine if true. For Linux and Windows only. Default false.
  • node['java_se']['java_home'] - Alternative java_home location. Leave nil to use default location. For Linux and Windows only. Default nil.

Linux Only

  • node['java_se']['set_default'] - Indicates whether or not you want the JDK installed to be default on the system. Default true.
  • node['java_se']['owner'] - The owner of extracted directory. Default root.
  • node['java_se']['group'] - The group of extracted directory. Default root.
  • node['java_se']['alternatives_priority'] - A priority of the alternatives. Default 1061.
  • node['java_se']['set_etc_environment'] - Optionally sets JAVA_HOME in /etc/environment for. Default false.
  • node['java_se']['reset_alternatives'] - Whether alternatives is reset. Default true.
  • node['java_se']['use_alt_suffix'] whether '_alt' suffix is used for none default java install. Default false.
  • node['java_se']['bin_cmds'] - Array of binary commands to symlink /usr/bin to, and set alternative on. Examples are mvn, java, javac, etc. These cmds must be in the bin subdirectory of the extracted folder. Will be ignored if set_default is not true.

Windows Only

  • node['java_se']['win_addlocal'] - JDK features to install. Default ToolsFeature,SourceFeature,PublicjreFeature.
  • node['java_se']['win_javalink'] - Symbolic link to Java JDK bin directory. Since Windows PATH and JAVA_HOME are not available during chef-client run, this provides a way for cookbooks to access the latest installed version. Default %SYSTEMDRIVE%\java\bin.
  • node['java_se']['win_jre_home'] - Location to install public JRE. Leave nil to use default location. Default nil.

Bind (Do not override)

  • node['java_se']['release'] - The JDK release version.
  • node['java_se']['update'] - The JDK update version.
  • node['java_se']['build'] - The build number.
  • node['java_se']['sha256'][type][arch] - The checksum to validate the installer with. Where type is one of 'dmg', 'exe', or 'tar', and arch is one of 'x64' or 'i586'


This cookbook does NOT use SemVer for versioning.

The versioning scheme is RELEASE.UPDATE.MINOR where:

  1. RELEASE is the release of Java e.g. 8
  2. UPDATE is the Java update e.g. 77
  3. MINOR is the *cookbook release for an enhancement or bugfix e.g. 0

*All MINOR versions will strive to be backwards-compatible.

Getting Help


Please refer to CONTRIBUTING.


MIT - see the accompanying LICENSE file
for details.


8.201 2019-01-16

  • Update 8u201
  • Merge PR #23: Allow the tgz file extension for the java uri

8.192 2018-10-18

  • Update 8u192

8.181 2018-07-19

  • Update 8u181

8.172 2018-05-29

  • Update 8u172

8.171 2018-04-18

  • Update 8u171

8.162 2018-01-17

  • Update 8u162

8.152.1 2017-10-17

  • Fix Windows x64 checksum

8.152.0 2017-10-17

  • Update 8u152

8.151.0 2017-10-17

  • Update 8u151

8.144.0 2017-07-26

  • Update 8u144

8.141.0 2017-07-18

  • Update 8u141

8.131.0 2017-04-18

  • Update 8u131
  • Use cookstyle linter
  • Drop support for CentOS 5

8.121.0 2017-01-18

  • Update 8u121

8.112.1 2016-12-18

  • 8u112 for OSX has a different build number

8.112.0 2016-10-18

  • Update 8u112

8.111.0 2016-10-18

  • Update 8u111

8.102.1 2016-08-31

  • Fix #20 OSX install fails with Operation not permitted on El Capitan
  • Fix #19 Gem install of open_uri_redirections can fail on Windows
  • Fix #18 Windows fails to install because ENV variables do not exist
  • Fix #17 node.set is deprecated and will be removed in Chef 14

8.102.0 2016-07-19

  • Update 8u102

8.101.0 2016-07-19

  • Update 8u101

8.92.0 2016-04-19

  • Update 8u92

8.91.0 2016-04-19

  • Update 8u91

8.77.0 2016-03-29

  • Update 8u77

8.74.0 2016-02-10

  • Update 8u74

8.73.0 2016-02-09

  • Update 8u73

8.72.0 2016-01-19

  • Update 8u72

8.71.0 2016-01-19

  • Update 8u71


  • Fix #10 Retry download if file checksum is not valid


  • Support chef_gem compile_time attribute


  • Update 8u66


  • Update 8u65


  • Fix #5 Add support for changing the public JRE location on Windows (INSTALLDIRPUBJRE argument)


  • Fix #4 WARN: Cloning resource attributes for env[PATH] from prior resource (CHEF-3694)


  • Update readme to clarify file extensions supported


  • Rename java_version_on_osx? method to java_version_on_macosx?


  • Fix issue with Mac OS X install not using shellout mixlib correctly
  • Use %SYSTEMPATH% on Windows
  • Use link resource on Windows install


  • Fix #3 Allow skipping Java install


  • Add symbolic link to installed Java JDK bin directory on Windows


  • Remove unnecessary start cmd from windows install
  • Add info about script to demo downloading from Oracle and populating an alt website


  • Tweak readme


  • Fix #1 URI parameter ignored


  • Update 8u60


  • Remove unused dmg dependency


  • Support Linux installs


  • Deprecate url and file attributes in favor of uri


  • Support Mac OS X install


  • Initial release

Foodcritic Metric

8.201.0 passed this metric

No Binaries Metric

8.201.0 passed this metric

Version Tag Metric

8.201.0 passed this metric