{"id":15045932,"url":"https://github.com/octylfractal/java-preloader-reloadeder","last_synced_at":"2025-04-10T00:44:01.994Z","repository":{"id":46775707,"uuid":"298106916","full_name":"octylFractal/java-preloader-reloadeder","owner":"octylFractal","description":"A JDK version manager","archived":false,"fork":false,"pushed_at":"2025-03-28T23:30:30.000Z","size":210,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T00:43:57.847Z","etag":null,"topics":["java","jdk","rust","version-manager"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octylFractal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2020-09-23T22:16:15.000Z","updated_at":"2025-03-28T23:30:33.000Z","dependencies_parsed_at":"2024-11-08T09:27:38.143Z","dependency_job_id":"8c0c7a11-06a7-44be-93d5-02a2737fb218","html_url":"https://github.com/octylFractal/java-preloader-reloadeder","commit_stats":{"total_commits":43,"total_committers":4,"mean_commits":10.75,"dds":0.06976744186046513,"last_synced_commit":"d684a9ba3b259c21cb26f69c79a8edd14c8b49fb"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octylFractal%2Fjava-preloader-reloadeder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octylFractal%2Fjava-preloader-reloadeder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octylFractal%2Fjava-preloader-reloadeder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octylFractal%2Fjava-preloader-reloadeder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octylFractal","download_url":"https://codeload.github.com/octylFractal/java-preloader-reloadeder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137998,"owners_count":21053775,"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":["java","jdk","rust","version-manager"],"created_at":"2024-09-24T20:52:29.367Z","updated_at":"2025-04-10T00:44:01.968Z","avatar_url":"https://github.com/octylFractal.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"java-preloader-reloadeder\n=========================\n[![Crates.io](https://img.shields.io/crates/v/jpre?style=flat-square)](https://crates.io/crates/jpre)\n\nReplacement for my old [gist](https://gist.github.com/octylFractal/d85e0b160d8be75dbca29910a2b34f34).\n\nDownloads JDKs from [foojay DiscoAPI](https://api.foojay.io/swagger-ui/) and stores them in `\u003ccache dir\u003e/jpre/jdks`.\n`\u003ccache dir\u003e` is based on [\n`directories`](https://docs.rs/directories/latest/directories/struct.ProjectDirs.html#method.cache_dir).\n\nPreferred distribution can be set in the config (also `directories`-based), defaults to `temurin`.\n\n# Installation\n\nRun `cargo install jpre` to get the `jpre` binary.\n\nThen, do the following (or similar) in your shell's startup script:\n\n```sh\n# This may be necessary to ensure the context is understood everywhere\nexport JPRE_CONTEXT_ID=\"$(jpre get-context-id)\"\n# Sets the Java home to the jpre-managed location. This will be symlinked to the currently active JDK.\nexport JAVA_HOME=\"$(jpre java-home)\"\n# Puts the binaries on your path\nexport PATH=\"$JAVA_HOME/bin:$PATH\"\n# Potentially optional, forces shell to re-scan for `java` et. al\nhash -r\n```\n\nNote that if you do not set a default JDK (with `jpre default`), the symlinked path will lead nowhere!\n\n# Usage\n\nRun e.g. `jpre use 17`, this downloads Temurin JDK 17 and makes it the active JDK.\nOther major versions can be downloaded and configured using `jpre use \u003cmajor\u003e`.\nThe default JDK can be set using `jpre default \u003cmajor\u003e`.\n\nFull details are available by running `jpre help`.\n\n# How it works\n\n`jpre` uses the parent process ID as a key to determine the symlink location. This makes it work per-shell (or other\nprocess) and not interfere with other sessions. The symlink is in the `jpre` cache directory and is updated every time\na JDK is selected.\n\nIn order to prevent cross-session pollution, `java-home` clears any existing symlink before creating a new one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctylfractal%2Fjava-preloader-reloadeder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctylfractal%2Fjava-preloader-reloadeder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctylfractal%2Fjava-preloader-reloadeder/lists"}