{"id":19196193,"url":"https://github.com/coursier/jvm-index","last_synced_at":"2026-02-23T00:19:13.392Z","repository":{"id":37100052,"uuid":"240295727","full_name":"coursier/jvm-index","owner":"coursier","description":"JVM index generator","archived":false,"fork":false,"pushed_at":"2025-05-01T00:53:37.000Z","size":2640,"stargazers_count":22,"open_issues_count":4,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-01T01:36:57.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coursier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-13T15:36:59.000Z","updated_at":"2025-04-25T13:38:04.000Z","dependencies_parsed_at":"2024-06-25T12:46:10.808Z","dependency_job_id":"1b01a4b9-76da-4a4d-ac97-fbcbe9b3e87c","html_url":"https://github.com/coursier/jvm-index","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coursier%2Fjvm-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coursier%2Fjvm-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coursier%2Fjvm-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coursier%2Fjvm-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coursier","download_url":"https://codeload.github.com/coursier/jvm-index/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171166,"owners_count":21865275,"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":[],"created_at":"2024-11-09T12:12:57.423Z","updated_at":"2026-02-23T00:19:13.380Z","avatar_url":"https://github.com/coursier.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coursier jvm-index\n\n[![Update index](https://github.com/coursier/jvm-index/actions/workflows/update-index.yml/badge.svg)](https://github.com/coursier/jvm-index/actions/workflows/update-index.yml)\n[![Publish](https://github.com/coursier/jvm-index/actions/workflows/publish.yml/badge.svg)](https://github.com/coursier/jvm-index/actions/workflows/publish.yml)\n\nThis repository hosts and manages the JVM index used by the `cs java` and `cs java-home`\ncommands of [coursier](https://get-coursier.io), and more generally, the JVM management\ncapabilities of coursier.\n\n## Available JDKs\n\n| JDK                                                                                  | id in index         |\n| ------------------------------------------------------------------------------------ | ------------------- |\n| [Eclipse Temurin](https://adoptium.net/temurin/releases) (recommended / default)     | `temurin`           |\n| [GraalVM community](https://github.com/graalvm/graalvm-ce-builds/releases)           | `graalvm-community` |\n| [Oracle JDKs](https://www.oracle.com/java/technologies/downloads/)                   | `oracle`            |\n| [Azul Zulu](https://www.azul.com/downloads/?package=jdk#zulu)                        | `zulu`              |\n| [bellsoft Liberica](https://bell-sw.com/pages/downloads/)                            | `liberica`          |\n| [bellsoft Liberica Native Image Kit](https://bell-sw.com/liberica-native-image-kit/) | `liberica-nik`      |\n| [Amazon Corretto](https://aws.amazon.com/corretto/)                                  | `corretto`          |\n| [IBM Semeru](https://developer.ibm.com/languages/java/semeru-runtimes/)              | `ibm-semeru`        |\n| [Microsoft OpenJDK](https://learn.microsoft.com/en-us/java/openjdk/download)         | `microsoft-openjdk` |\n\n## Legacy JDKs\n\n| JDK                                            | id in index |\n| ---------------------------------------------- | ----------- |\n| AdoptOpenJDK                                   | `adopt`     |\n| Merge of AdoptOpenJDK and Eclipse Temurin JDKs | `adoptium`  |\n\n## Index structure\n\nThe index comes in 2 shapes:\n- a [Jabba](https://github.com/shyiko/jabba)-compatible single JSON file, [`index.json`](https://github.com/coursier/jvm-index/blob/master/index.json)\n- per-OS and CPU architecture indices, under [`indices/`](https://github.com/coursier/jvm-index/tree/master/indices)\n\nWhile the former is only available on GitHub, the latter is also pushed to Maven Central,\nunder the [`io.get-coursier.jvm.indices`](https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/)\norganization.\n\n### Jabba-compatible index\n\nThat index consists in 4 nested JSON objects, with the successive keys of these objects being:\n- the OS\n  - `linux`\n  - `darwin` (macOS)\n  - `windows`\n  - `linux-musl` (for [musl libc](https://www.musl-libc.org)-based systems, like Alpine Linux),\n  - `aix`\n  - `solaris`\n- the CPU architecture\n  - `amd64`\n  - `arm64` (a.k.a. `aarch64`, Raspberry PI or Mac M1-M4 CPUs)\n  - `x86` (32-bit)\n  - `arm` (32-bit ARM)\n  - `ppc64`\n  - `ppc64le`\n  - `s390x`\n- the JDK name, prefixed by `jdk@`, like\n  - `jdk@temurin`\n  - `jdk@graalvm-community`\n  - `jdk@liberica`\n  - `jdk@liberica-nik`\n  - `jdk@zulu`\n  - `jdk@corretto`\n  - `jdk@java-oracle`\n  - …\n- the JDK version, often prefixed with `1.`, like\n  - `1.8.0-432`\n  - `1.17.0.13`\n  - `1.21.0.5`\n  - `1.23.0.1`\n  - …\n\nThe values of the fourth nested object look like\n```\n${TYPE}+${URL}\n```\n\n`${TYPE}` being one of\n- `tgz` (for gzip-compressed tar archive JDKs, on Unixes typically)\n- `zip` (for zip-compressed JDKs, on Windows typically)\n\n`${URL}` being the URL of the JDK archive, like `https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_aarch64_mac_hotspot_23.0.1_11.tar.gz`.\n\nValue examples\n```text\ntgz+https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_aarch64_mac_hotspot_23.0.1_11.tar.gz\nzip+https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_x64_windows_hotspot_23_37.zip\n```\n\nExample commands to inspect the index locally:\n```bash\n$ cat \"$(cs get https://github.com/coursier/jvm-index/raw/refs/heads/master/index.json)\" |\n    jq 'keys'\n[\n  \"aix\",\n  \"darwin\",\n  \"linux\",\n  \"linux-musl\",\n  \"solaris\",\n  \"windows\"\n]\n\n$ cat \"$(cs get https://github.com/coursier/jvm-index/raw/refs/heads/master/index.json)\" |\n    jq '.darwin | keys'\n[\n  \"amd64\",\n  \"arm64\"\n]\n\n$ cat \"$(cs get https://github.com/coursier/jvm-index/raw/refs/heads/master/index.json)\" |\n    jq '.darwin.amd64 | keys'\n[\n  \"jdk@corretto\",\n  \"jdk@graalvm-community\",\n  \"jdk@graalvm-oracle\",\n  \"jdk@java-oracle\",\n  \"jdk@liberica\",\n  \"jdk@temurin\",\n  \"jdk@zulu\",\n  …\n]\n\n$ cat \"$(cs get https://github.com/coursier/jvm-index/raw/refs/heads/master/index.json)\" |\n    jq '.darwin.amd64[\"jdk@temurin\"] | keys'\n[\n  \"1.11.0.25\",\n  \"1.16.0.2\",\n  \"1.17.0.13\",\n  \"1.18.0.2.1\",\n  \"1.19.0.2\",\n  \"1.20.0.2\",\n  \"1.21.0.5\",\n  \"1.22.0.2\",\n  \"1.23\",\n  \"1.23.0.1\",\n  \"1.8.0-432\",\n  …\n]\n\n$ cat \"$(cs get https://github.com/coursier/jvm-index/raw/refs/heads/master/index.json)\" |\n    jq '.darwin.amd64[\"jdk@temurin\"][\"1.23.0.1\"]'\n\"tgz+https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_x64_mac_hotspot_23.0.1_11.tar.gz\"\n```\n\n### Per-OS and CPU architecture indices\n\nThese consist in 2 nested JSON objects, whose keys are:\n- the JDK name, like\n  - `temurin`\n  - `graalvm-community`\n  - `liberica`\n  - `zulu`\n  - `corretto`\n  - `java-oracle`\n  - …\n- the JDK version, like\n  - `8.0-432`\n  - `17.0.13`\n  - `21.0.5`\n  - `23.0.1`\n  - …\n\nThe values of the second nested object look like those of the [Jabba-compatible index](#jabba-compatible-index):\n```\n${TYPE}+${URL}\n```\n\n`${TYPE}` being one of\n- `tgz` (for gzip-compressed tar archive JDKs, on Unixes typically)\n- `zip` (for zip-compressed JDKs, on Windows typically)\n\n`${URL}` being the URL of the JDK archive, like `https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_aarch64_mac_hotspot_23.0.1_11.tar.gz`.\n\nValue examples\n```text\ntgz+https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_aarch64_mac_hotspot_23.0.1_11.tar.gz\nzip+https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_x64_windows_hotspot_23_37.zip\n```\n\nThese indices live at Maven coordinates like\n```text\nio.get-coursier.jvm.indices:index-${OS}-${CPU}:${INDEX_VERSION}\n```\n\n`${OS}` being one of:\n  - `linux`\n  - `darwin` (macOS)\n  - `windows`\n  - `linux-musl` (for [musl libc](https://www.musl-libc.org)-based systems, like Alpine Linux),\n  - `aix`\n  - `solaris`\n\n`${CPU}` being one of:\n  - `amd64`\n  - `arm64` (a.k.a. `aarch64`, Raspberry PI or Mac M1-M4 CPUs)\n  - `x86` (32-bit)\n  - `arm` (32-bit ARM)\n  - `ppc64`\n  - `ppc64le`\n  - `s390x`\n\n`${INDEX_VERSION}` can be found from [directory listings](https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/)\nor [`maven-metadata.xml`](https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/maven-metadata.xml) files on Maven Central.\n\nExample commands to inspect such an index locally:\n```text\n$ unzip -l \"$(cs get https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/0.0.4-70-51469f/index-darwin-arm64-0.0.4-70-51469f.jar)\"\nArchive:  ~/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/0.0.4-70-51469f/index-darwin-arm64-0.0.4-70-51469f.jar\n  Length      Date    Time    Name\n---------  ---------- -----   ----\n      332  11-14-2024 09:51   META-INF/MANIFEST.MF\n        0  11-14-2024 09:51   META-INF/\n        0  11-14-2024 09:51   coursier/\n        0  11-14-2024 09:51   coursier/jvm/\n        0  11-14-2024 09:51   coursier/jvm/indices/\n        0  11-14-2024 09:51   coursier/jvm/indices/v1/\n   157254  11-14-2024 09:51   coursier/jvm/indices/v1/darwin-arm64.json\n---------                     -------\n   157586                     7 files\n\n$ unzip -p \"$(cs get https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/0.0.4-70-51469f/index-darwin-arm64-0.0.4-70-51469f.jar)\" coursier/jvm/indices/v1/darwin-arm64.json |\n    jq keys\n[\n  \"corretto\",\n  \"graalvm-community\",\n  \"graalvm-oracle\",\n  \"ibm-semeru\",\n  \"java-oracle\",\n  \"liberica\",\n  \"temurin\",\n  \"zulu\",\n  …\n]\n\n$ unzip -p \"$(cs get https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/0.0.4-70-51469f/index-darwin-arm64-0.0.4-70-51469f.jar)\" coursier/jvm/indices/v1/darwin-arm64.json |\n    jq '.temurin | keys'\n[\n  \"11.0.25\",\n  \"17.0.13\",\n  \"18.0.2.1\",\n  \"19.0.2\",\n  \"20.0.2\",\n  \"21.0.5\",\n  \"22.0.2\",\n  \"23.0.1\",\n  …\n]\n\n$ unzip -p \"$(cs get https://repo1.maven.org/maven2/io/get-coursier/jvm/indices/index-darwin-arm64/0.0.4-70-51469f/index-darwin-arm64-0.0.4-70-51469f.jar)\" coursier/jvm/indices/v1/darwin-arm64.json |\n    jq '.temurin[\"23.0.1\"]'\n\"tgz+https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_aarch64_mac_hotspot_23.0.1_11.tar.gz\"\n```\n\n## Use by coursier\n\n### API\n\nAs of writing this (coursier `2.1.18`), coursier relies by default on the Jabba-compatible single JSON file index, but is able to use the per-OS and CPU index from Maven Central.\n\n```scala mdoc:silent\nimport coursier.cache.FileCache\nimport coursier.jvm._\nval cache = FileCache()\nval jvmCache = JvmCache().withDefaultIndex\nval javaHomeManager = JavaHome().withCache(jvmCache)\nval javaHome = javaHomeManager.get(\"temurin:21\")\n  .unsafeRun()(cache.ec)\n```\n\nUsing the per-OS and CPU index from Maven Central:\n```scala mdoc:silent:reset\nimport coursier.cache.FileCache\nimport coursier.jvm._\nval cache = FileCache()\nval jvmCache = JvmCache().withIndexChannel(\n  coursier.Resolve().finalRepositories.unsafeRun()(cache.ec),\n  JvmChannel.central()\n)\nval javaHomeManager = JavaHome().withCache(jvmCache)\nval javaHome = javaHomeManager.get(\"temurin:21\")\n  .unsafeRun()(cache.ec)\n```\n\n### CLI\n\nThe index generated here is now used by the `java` and `java-home`\ncommands of [coursier](https://get-coursier.io).\n\nIf you suspect one of those commands doesn't use a newer JVM version, pass `--update --ttl 0` to them,\nlike\n```text\n$ cs java --env --jvm graalvm-community:23 --update --ttl 0\n```\n\n## Use by Scala CLI\n\n[Scala CLI](https://github.com/VirtusLab/scala-cli) relies on coursier to manage JDKs. It automatically\ndownloads JDKs if needed, based on the `--jvm …` option and `//\u003e jvm …` directive.\n\n## Use by Mill\n\nThe [Mill build tool](https://mill-build.org) allows its users to pick a JVM to compile / run / test code. As of\nwriting this, this feature has just been merged via [`com-lihaoyi/mill#3716`](https://github.com/com-lihaoyi/mill/pull/3716)\n\n## How this repository works\n\n### Workflow\n\nThe [`update-index` workflow](https://github.com/coursier/jvm-index/blob/master/.github/workflows/update-index.yml)\nruns daily. It lists available JVMs from various providers, and re-generates the indices. If any\nchange is found, a PR for it is opened.\n\nMaintainers need to pick the PR, check that it doesn't contain anything suspicious, approve it,\nand merge it.\n\nUpon merge, the [Jabba-compatible index](#jabba-compatible-index) is immediately up-to-date.\nThe [`publish` workflow](https://github.com/coursier/jvm-index/blob/master/.github/workflows/publish.yml)\nruns and pushes updated [per-OS and CPU architecture indices](#per-os-and-cpu-architecture-indices)\nto Maven Central. Once the `publish` workflow ran successfully, up to a few hours are sometimes needed\nfor the newer indices to be available on [Maven Central](https://repo1.maven.org/maven2).\n\n## Generating the index locally\n\nGenerate an index with\n```bash\n$ GH_TOKEN=\"****\" ./scala-cli.sh src\n```\nor\n```powershell\n$Env:GH_TOKEN=\"*****\"\nscala-cli src\n```\n\nJust `./scala-cli.sh src` can work if `GH_TOKEN` is not set, but it usually gets\nrate-limited by the GitHub API. You can read more about creating a token\n[here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).\nJust having the `public_repo` scope will be enough for the access you need.\n\nThe index is written in `index.json` in the current directory.\n\n## About\n\nCopyright (c) 2020-2022, Alexandre Archambault\n\nLicensed under the Apache version 2 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoursier%2Fjvm-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoursier%2Fjvm-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoursier%2Fjvm-index/lists"}