{"id":15022733,"url":"https://github.com/puppetlabs/puppetlabs-java","last_synced_at":"2025-05-15T20:04:48.239Z","repository":{"id":839178,"uuid":"1795089","full_name":"puppetlabs/puppetlabs-java","owner":"puppetlabs","description":"Puppet Module to manage Java","archived":false,"fork":false,"pushed_at":"2025-04-23T12:19:09.000Z","size":902,"stargazers_count":102,"open_issues_count":9,"forks_count":271,"subscribers_count":174,"default_branch":"main","last_synced_at":"2025-05-03T01:55:46.545Z","etag":null,"topics":["hacktoberfest","module","supported"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/puppetlabs/java","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-05-24T18:58:57.000Z","updated_at":"2025-04-23T12:19:12.000Z","dependencies_parsed_at":"2024-06-04T09:45:48.682Z","dependency_job_id":"3692b93a-c377-4fd5-bfd3-28a86b59beec","html_url":"https://github.com/puppetlabs/puppetlabs-java","commit_stats":{"total_commits":590,"total_committers":159,"mean_commits":3.710691823899371,"dds":0.9152542372881356,"last_synced_commit":"4e2246d6c2cb336fdc57b23e72a5d28a4812cd8b"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043220,"owners_count":22004912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","module","supported"],"created_at":"2024-09-24T19:58:19.715Z","updated_at":"2025-05-15T20:04:41.857Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n3. [Setup - The basics of getting started with the java module](#setup)\n    * [Beginning with the java module](#beginning-with-the-java-module)\n4. [Usage - Configuration options and additional functionality](#usage)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n6. [Limitations - OS compatibility, etc.](#limitations)\n7. [License](#license)\n8. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nInstalls the correct Java package on various platforms.\n\n## Module Description\n\nThe java module can automatically install Java jdk or jre on a wide variety of systems. Java is a base component for many software platforms, but Java system packages don't always follow packaging conventions. The java module simplifies the Java installation process.\n\n## Setup\n\n### Beginning with the java module\n\nTo install the correct Java package on your system, include the `java` class: `include java`.\n\n## Usage\n\nThe java module installs the correct jdk or jre package on a wide variety of systems. By default, the module installs the jdk package, but you can set different installation parameters as needed. For example, to install jre instead of jdk, you would set the distribution parameter:\n\n```puppet\nclass { 'java':\n  distribution =\u003e 'jre',\n}\n```\n\nTo install the latest patch version of Java 8 on CentOS\n\n```puppet\nclass { 'java' :\n  package =\u003e 'java-1.8.0-openjdk-devel',\n}\n```\n\nThe defined type `java::download` installs one or more versions of Java SE from a remote url. `java::download` depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive).\n\nTo install Java to a non-default basedir (defaults: /usr/lib/jvm for Debian; /usr/java for RedHat):\n```puppet\njava::download { 'jdk8' :\n  ensure  =\u003e 'present',\n  java_se =\u003e 'jdk',\n  url     =\u003e 'http://myjava.repository/java.tgz\",\n  basedir =\u003e '/custom/java',\n}\n```\n\n## AdoptOpenJDK\n\nThe defined type `java::adopt` installs one or more versions of AdoptOpenJDK Java. `java::adopt` depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive).\n\n```puppet\njava::adopt { 'jdk8' :\n  ensure  =\u003e 'present',\n  version =\u003e '8',\n  java =\u003e 'jdk',\n}\n\njava::adopt { 'jdk11' :\n  ensure  =\u003e 'present',\n  version =\u003e '11',\n  java =\u003e 'jdk',\n}\n```\n\nTo install a specific release of a AdoptOpenJDK Java version, e.g. 8u202-b08, provide both parameters `version_major` and `version_minor` as follows:\n\n```puppet\njava::adopt { 'jdk8' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '8u202',\n  version_minor =\u003e 'b08',\n  java =\u003e 'jdk',\n}\n```\n\nTo install AdoptOpenJDK Java to a non-default basedir (defaults: /usr/lib/jvm for Debian; /usr/java for RedHat):\n```puppet\njava::adopt { 'jdk8' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '8u202',\n  version_minor =\u003e 'b08',\n  java =\u003e 'jdk',\n  basedir =\u003e '/custom/java',\n}\n```\n\nTo ensure that a custom basedir is a directory before AdoptOpenJDK Java is installed (note: manage separately for custom ownership or perms):\n```puppet\njava::adopt { 'jdk8' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '8u202',\n  version_minor =\u003e 'b08',\n  java =\u003e 'jdk',\n  manage_basedir =\u003e true,\n  basedir =\u003e '/custom/java',\n}\n```\n\n## Adoptium Temurin\n\nAdoptium Temurin is the successor of AdoptOpenJDK and is supported using the defined type `java::adoptium`. It depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive).\n\nThe `java::adoptium` defined type expects a major, minor, patch and build version to download the specific release. It doesn't support jre downloads as the other distributions.\n\n```puppet\njava::adoptium { 'jdk16' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '16',\n  version_minor =\u003e '0',\n  version_patch =\u003e '2',\n  version_build =\u003e '7',\n}\njava::adoptium { 'jdk17' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '17',\n  version_minor =\u003e '0',\n  version_patch =\u003e '1',\n  version_build =\u003e '12',\n}\n```\n\nTo install Adoptium to a non-default basedir (defaults: /usr/lib/jvm for Debian; /usr/java for RedHat):\n\n```puppet\njava::adoptium { 'jdk7' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '17',\n  version_minor =\u003e '0',\n  version_patch =\u003e '1',\n  version_build =\u003e '12',\n  basedir =\u003e '/custom/java',\n}\n```\n\nTo ensure that a custom basedir is a directory before Adoptium is installed (note: manage separately for custom ownership or perms):\n\n```puppet\njava::adoptium { 'jdk8' :\n  ensure  =\u003e 'present',\n  version_major =\u003e '17',\n  version_minor =\u003e '0',\n  version_patch =\u003e '1',\n  version_build =\u003e '12',\n  manage_basedir =\u003e true,\n  basedir =\u003e '/custom/java',\n}\n```\n\n## SAP Java (sapjvm / sapmachine)\n\nSAP also offers JVM distributions. They are mostly required for their SAP products. In earlier versions it is called \"sapjvm\", in newer versions they call it \"sapmachine\".\n\nThe defined type `java::sap` installs one or more versions of sapjvm (if version 7 or 8) or sapmachine (if version \u003e 8) Java. `java::sap` depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive).\nBy using this defined type with versions 7 or 8 you agree with the EULA presented at https://tools.hana.ondemand.com/developer-license-3_1.txt!\n\n```puppet\njava::sap { 'sapjvm8' :\n  ensure  =\u003e 'present',\n  version =\u003e '8',\n  java =\u003e 'jdk',\n}\n\njava::sap { 'sapmachine11' :\n  ensure  =\u003e 'present',\n  version =\u003e '11',\n  java =\u003e 'jdk',\n}\n```\n\nTo install a specific release of a SAP Java version, e.g. sapjvm 8.1.063, provide parameter `version_full`:\n\n```puppet\njava::sap { 'jdk8' :\n  ensure  =\u003e 'present',\n  version_full =\u003e '8.1.063',\n  java =\u003e 'jdk',\n}\n```\n\nTo install SAP Java to a non-default basedir (defaults: /usr/lib/jvm for Debian; /usr/java for RedHat):\n```puppet\njava::adopt { 'sapjvm8' :\n  ensure  =\u003e 'present',\n  version_full =\u003e '8.1.063',\n  java =\u003e 'jdk',\n  basedir =\u003e '/custom/java',\n}\n```\n\nTo ensure that a custom basedir is a directory before SAP Java is installed (note: manage separately for custom ownership or perms):\n```puppet\njava::adopt { 'sapjvm8' :\n  ensure  =\u003e 'present',\n  version_full =\u003e '8.1.063',\n  java =\u003e 'jdk',\n  manage_basedir =\u003e true,\n  basedir =\u003e '/custom/java',\n}\n```\n\n## Reference\n\nFor information on the classes and types, see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-java/blob/main/REFERENCE.md). For information on the facts, see below.\n\n### Facts\n\nThe java module includes a few facts to describe the version of Java installed on the system:\n\n* `java_major_version`: The major version of Java.\n* `java_patch_level`: The patch level of Java.\n* `java_version`: The full Java version string.\n* `java_default_home`: The absolute path to the java system home directory (only available on Linux). For instance, the `java` executable's path would be `${::java_default_home}/jre/bin/java`. This is slightly different from the \"standard\" JAVA_HOME environment variable.\n* `java_libjvm_path`: The absolute path to the directory containing the shared library `libjvm.so` (only available on Linux). Useful for setting `LD_LIBRARY_PATH` or configuring the dynamic linker.\n\n**Note:** The facts return `nil` if Java is not installed on the system.\n\n## Limitations\n\nFor an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-java/blob/main/metadata.json)\n\nThis module cannot guarantee installation of Java versions that are not available on platform repositories.\n\nThis module only manages a singular installation of Java, meaning it is not possible to manage e.g. OpenJDK 7, Oracle Java 7 and Oracle Java 8 in parallel on the same system.\n\nOracle Java packages are not included in Debian 7 and Ubuntu 12.04/14.04 repositories. To install Java on those systems, you'll need to package Oracle JDK/JRE, and then the module can install the package. For more information on how to package Oracle JDK/JRE, see the [Debian wiki](http://wiki.debian.org/JavaPackage).\n\nThis module is officially [supported](https://forge.puppetlabs.com/supported) for the following Java versions and platforms:\n\nOpenJDK is supported on:\n\n* Red Hat Enterprise Linux (RHEL) 7, 8, 9\n* CentOS 7, 8\n* Oracle Linux 7\n* Debian 10, 11\n* Ubuntu 18.04, 20.04, 22.04\n* Solaris 11\n* SLES 12, 15\n\nOracle Java is supported on:\n\n* CentOS 7\n* CentOS 8\n* Red Hat Enterprise Linux (RHEL) 7\n\nAdoptOpenJDK Java is supported on:\n\n* CentOS\n* Red Hat Enterprise Linux (RHEL)\n* Amazon Linux\n* Debian\n\nAdoptium Temurin Java is supported on:\n\n* CentOS\n* Red Hat Enterprise Linux (RHEL)\n* Amazon Linux\n* Debian\n\nSAP Java 7 and 8 (=sapjvm) are supported (by SAP) on:\n\n* SLES 12, 15\n* Oracle Linux 7, 8\n* Red Hat Enterprise Linux (RHEL) 7, 8\n\n(however installations on other distributions mostly also work well)\n\nFor SAP Java \u003e 8 (=sapmachine) please refer to the OpenJDK list as it is based on OpenJDK and has no special requirements.\n\n### Known issues\n\nWhere Oracle change the format of the URLs to different installer packages, the curl to fetch the package may fail with a HTTP/404 error. In this case, passing a full known good URL using the `url` parameter will allow the module to still be able to install specific versions of the JRE/JDK. Note the `version_major` and `version_minor` parameters must be passed and must match the version downloaded using the known URL in the `url` parameter. \n\n#### OpenBSD\n\nOpenBSD packages install Java JRE/JDK in a unique directory structure, not linking\nthe binaries to a standard directory. Because of that, the path to this location\nis hardcoded in the `java_version` fact. Whenever you upgrade Java to a newer\nversion, you have to update the path in this fact.\n\n## License\n\nThis codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing.\n\n## Development\n\nPuppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. To contribute to Puppet projects, see our [module contribution guide.](https://docs.puppetlabs.com/forge/contributing.html)\n\n## Contributors\n\nThe list of contributors can be found at [https://github.com/puppetlabs/puppetlabs-java/graphs/contributors](https://github.com/puppetlabs/puppetlabs-java/graphs/contributors).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-java/lists"}