A lightweight, high-performance, color-coded Windows command-line utility designed to dynamically discover, download, and switch Java Development Kits (JDKs) and the entire JVM Ecosystem with native SDKMAN! parity.
π₯ Installation Β β’Β π Channels Β β’Β π Features Β β’Β π’ Enterprise Β β’Β π Documentation Β β’Β π οΈ Usage Β β’Β π Version History Β β’Β π€ Community
Choose your update channel and run the one-liner in Windows PowerShell (no Administrator privileges required):
π’ Stable Channel (Official Releases β Recommended):
irm https://raw.githubusercontent.com/DiamTek/Java-Version-Manager-Windows/main/install.ps1 | iexπ£ Nightly Channel (Cutting-Edge β Latest commits from main branch):
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/DiamTek/Java-Version-Manager-Windows/main/install.ps1))) -Channel NightlyOr via explicit Invoke-WebRequest:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/DiamTek/Java-Version-Manager-Windows/main/install.ps1" -OutFile "$env:TEMP\install.ps1"; & "$env:TEMP\install.ps1"This instantly downloads the core engine, provisions %LOCALAPPDATA%\DiamTek\JVM, registers the Windows uninstaller, and updates your PowerShell Profile so the jvm command is available everywhere. You can switch channels at any time using jvm channel.
Tip: You can switch between channels at any time after installation via jvm channel [stable|nightly] or via Option 4 in the interactive Settings menu (jvm -> Settings).
winget install DiamTek.JVM
scoop install jvm
choco install jvm-windowsOr grab the standalone MSI installers (x64 / arm64), portable .zip, or raw jvm.bat directly from Releases.
Easily remove JVM and all associated configurations:
- Windows Settings: Open Installed apps -> DiamTek Java Version Manager -> Uninstall.
- Start Menu: Search "Uninstall Java Version Manager" and hit Enter.
- Terminal: Run
jvm self-uninstallor select Option 4 in the Settings menu.
- Zero Dependencies (100% Native Windows): Unlike SDKMAN or similar Unix-ports that require heavy POSIX subsystems (WSL, MSYS2, Git Bash,
curl,zip), this utility is built entirely on native Windows APIs. It leverages pure Batch and embedded.NETFramework endpoints for networking, zip extraction, and SHA256 cryptography to run instantly out-of-the-box on any Windows 10/11 machine. - Windows Terminal & Modern Shell Integration: Automatically registers a native "Java Version Manager" profile in Windows Terminal with custom high-resolution branding (
icon.png), seamless+new tab dropdown access, and auto-closing tab lifecycles (closeOnExit: always). Generates Start Menu application shortcuts and automatically synchronizes existing pinned taskbar shortcuts. - Full JVM Ecosystem Support (SDKMAN Parity): Move beyond just Java! This tool features a powerful, UAC-free Universal Candidate Engine that natively resolves, downloads, and symlinks modern JVM build tools. Install and switch between Maven, Gradle, Kotlin, Scala, and Groovy instantly (
jvm install maven,jvm install scala latest,jvm gradle 8.5) β all without adding any heavy dependencies. Version arguments default tolateston installation and are automatically detected on uninstallation. - Dynamic Vendor Architecture: Menus are dynamically grouped and filtered by vendor (Oracle, Adoptium, GraalVM, Corretto, Zulu, Microsoft, Liberica, Semeru) to keep your workspace clean and organized.
- Intelligent Background Sorting: Features a built-in, stable bubble-sort algorithm that organizes all discovered JDKs by their major version in descending order, ensuring your newest installations are always at the top of the list.
- Semantic Target Routing: Speak to the tool in human terms. Automatically jump to or install the latest available JDK using targets like
jvm latestorjvm lts. The engine queries the Adoptium API at runtime to dynamically resolve the true latest feature release and LTS version numbers, so you never have to hardcode them. - ARM64 / AArch64 Auto-Detection: Automatically detects your CPU architecture at startup (
x64vsARM64) and routes all vendor API queries to the correct architecture-specific download endpoint. Zero configuration needed β it just works on both Intel/AMD and ARM Windows machines. - Dual-Architecture Core (UAC-Free vs Registry): Toggle seamlessly between lightning-fast Symlink Mode (bypasses UAC completely using a Directory Junction at
%LOCALAPPDATA%\DiamTek\JVM\current) and legacy Registry Mode (auto-elevating background scripts to update systemHKLMenvironment variables) based on your system compatibility needs. - Accurate Windows 11 Installed Apps Footprint: Calculates dynamic recursive file size across your installation and candidate stores, enforcing a 1,024 KB minimum floor so Windows 11 Settings displays your true storage footprint.
- Directory-based Auto-Switching (
.java-version&.sdkmanrc): Instantly configure a project's required environment by simply runningjvminside any directory containing a.java-versionor SDKMAN.sdkmanrcfile. The tool parses the file and seamlessly swaps your environment in the background with True Session Isolation (doesn't pollute your global Windows Registry)..java-versionis strictly for JDKs, but our engine is incredibly advanced: it natively supports parsing full CLI flags directly from the file (e.g.,21 --vendor adoptium --legacy), allowing you to lock specific vendors or architecture modes on a strict per-project basis..sdkmanrcnatively supports the entire JVM Ecosystem! If you're collaborating with SDKMAN users on macOS/Linux, JVM will happily hijack their.sdkmanrcfiles on Windows, mapping their JDK vendor strings (-tem,-amzn,-librca,-sem, etc.) directly to your native JDKs, and automatically isolating and activating the project's exact required versions of Maven, Gradle, Kotlin, Scala, and Groovy for that specific terminal session.
- Interactive Ecosystem Auto-Updater: Engineered with a dynamic, vendor-sorted Updater menu that displays your active versions across JDKs and Ecosystem tools, queries GitHub/Apache APIs to resolve the absolute latest stable releases in real-time, and seamlessly prompts to upgrade any out-of-date binaries.
- Global Command & Shell Hooks: Features a built-in Settings menu that dynamically injects the
jvmcommand into your system PATH, and can optionally install a native PowerShell Profile Hook to enable true, isolated--sessionsupport across multiple terminal tabs. - Advanced CLI Quick-Switching: Supports intelligent argument parsing to bypass the UI entirely. If multiple vendors are installed for the same JDK version, it safely pauses to ask you which vendor you want to switch to, which can be bypassed on the fly with the
--vendorflag. - Multi-Vendor API Auto-Downloader: Connects directly to official vendor APIs (Oracle, Adoptium v3, GitHub for GraalVM, Amazon Corretto, Azul Zulu, Microsoft Build of OpenJDK, BellSoft Liberica, IBM Semeru) via a transparent, isolated PowerShell instance to dynamically resolve, download, and extract modern JDK versions.
- Enterprise-Grade Integrity Verification: Enforces strict SHA256/SHA512 (and SHA1 for Liberica) checksum verification across all remote download pathways using native
.NETCryptography APIs. Validates payload integrity against official vendor checksum mirrors before extraction, protecting against transmission corruption, incomplete downloads, or CDN cache desynchronization. - Inline Multi-Vendor Update Checker: Dynamically generates and executes a self-contained PowerShell update script at runtime to query all eight vendor APIs (Oracle, Adoptium, GraalVM, Corretto, Zulu, Microsoft, Liberica, Semeru) for newer builds. Compares
SEMANTIC_VERSIONandJAVA_VERSIONstrings from the localreleasefile against live API responses, with automatic-LTSsuffix normalization for Adoptium. Oracle uses a legacyHEAD-request date comparison againstdownload.oracle.comfor maximum reliability. - Offline-Aware Error Handling: All network operations (downloads, update checks, API queries) are wrapped in structured error boundaries. If you are offline or an API is unreachable, the tool displays a clean
[ ERROR ] Network connection failed. You appear to be offline.message with a[ DETAIL ]trace instead of crashing with raw exception dumps. - Dynamic Environment Switching: Atomically updates
JAVA_HOMEand your user/systemPATHglobally while cleanly updating the environment variables of your active terminal session without spawning double paths. - The "Phantom Path" Killer: Unlike other version managers that passively append to your PATH (which Windows often ignores if a hardcoded shortcut exists), JVM actively hunts down and scrubs rogue, hardcoded Oracle shortcuts (e.g.,
Common Files\Oracle\Java\javapath) that MSIs forcefully inject into the front of yourPATH, ensuring your selectedJAVA_HOMEis always respected. - Bring Your Own JDK (BYO-JDK): Have a custom JDK build or a GraalVM native-image compiler installed manually? Use
jvm link <path> [name]to register it, and it will instantly integrate into the dynamic UI and CLI routing alongside your auto-downloaded JDKs. - Instant Menu Navigation: Uses a smart
NEEDS_RESCANcaching architecture to guarantee zero-latency navigation when moving back and forth between interactive submenus. - Dual Update Channels with SHA-256 Verification (Stable vs Nightly): Seamlessly switch between official, tagged GitHub releases (π’ Green
[Stable]) and cutting-edge development builds directly from themainbranch (π£ Purple[Nightly]) viajvm channel [stable|nightly]or the interactive Settings menu. Features cryptographic SHA-256 integrity verification against officialSHA256SUMS.txtrelease digests, ahead-of-remote safety checks that prevent downgrading local builds, and automated rate-limit safe GitHub fallbacks. - Built-in Self-Updater with External Handoff: Run
jvm version(or-v) to compare your semantic version and build number against GitHub. If an update is available,jvm self-updatedynamically bypasses CDN edge caching, chains execution to an external handoff runner (%TEMP%\jvm_updater_*.bat) to eliminate Windowscmd.exefile locks, renders an interactive ANSI progress bar across all installation phases, validates arem END OF SCRIPTintegrity sentinel, and atomically hot-swaps the core script without touching installed runtimes or user settings. - Comprehensive Diagnostic Health Audit (
jvm doctor): Instant one-click diagnostic scanner that audits AppData storage root access, active architecture mode, directory junction integrity and target validity, User vs MachineJAVA_HOMEregistry synchronization,where.exe javaPATH precedence and rogue Oracle shadowing detection, and PowerShell profile hook status. - Ephemeral One-Off Subshell Runner (
jvm exec/jvm run): Execute builds, tests, or scripts against any installed JDK in an ephemeral isolated subshell (jvm exec 21 -- java -version,jvm run 17 mvn clean verify) without modifying your active Directory Junction, system environment, or Windows Registry. Accurately propagates the invoked command's exit code back to your host terminal. - Project Version Pinning (
jvm pin/jvm local): Effortlessly lock or inspect the directory-level.java-versionfile (jvm pin 21,jvm pin 21 --vendor adoptium) to guarantee seamless team coordination. - Instant Windows File Explorer Jump (
jvm open/jvm home): Instantly navigate to the active JDK installation, ecosystem candidate folder, or JVM storage root in Windows File Explorer directly from the CLI (jvm open,jvm open maven,jvm home). - PowerShell Profile Hook (
jvm hook): One-command manager (jvm hook,jvm hook status,jvm hook remove) to install, inspect, and remove the auto-sync wrapper function across Windows PowerShell 5.1 and PowerShell 7+ profiles without touching your global User PATH. - Native PowerShell Dynamic Tab-Completion: Features sub-millisecond, context-aware autocompletion for both Windows PowerShell 5.1 and PowerShell 7+ (
pwsh) via nativeRegister-ArgumentCompleter. Pressing<Tab>intelligently auto-completes commands across all invocation styles (jvm <Tab>,jvm.bat <Tab>,.\jvm.bat <Tab>), ecosystem candidates, flags (--vendor,--no-color), all 8 vendors, and dynamically scans installed JDK versions. - Industry-Standard
NO_COLOR& CI/CD Redirection: 100% compliant with the no-color.org specification. When theNO_COLORenvironment variable is defined or--no-coloris passed, all ANSI color codes are cleanly suppressed, preventing log artifact pollution in GitHub Actions, Azure DevOps, GitLab CI, and file redirections (jvm list --no-color > jdks.txt). - Ergonomic Shorthand Aliases: Supports intuitive, muscle-memory shortcuts from Unix, Docker, Git, and SDKMAN (
jvm ls,jvm rm,jvm info,jvm whoami,jvm check,jvm prune,jvm path,jvm home,jvm local,jvm run) for zero cognitive friction. - Ergonomic Transparent Aliases (
jvm use/jvm default): Native SDKMAN/nvm muscle memory support allowing developers to switch JDKs seamlessly using familiar commands. - Headless CI/CD Automation: Every command is engineered with zero-prompt bypass flags. Run complex installations like
jvm install lts --latest --vendor oracleorjvm uninstall 21 --vendor adoptiumto bypass all interactive menus for frictionless integration into CI/CD pipelines, DevOps scripts, or automated machine provisioning workflows.
Windows Directory Junctions (Symlinks) provide a massive speed and workflow improvement because they allow the script to instantly swap your Java version without ever needing Administrator privileges (UAC). By routing your User PATH to a single junction (%LOCALAPPDATA%\DiamTek\JVM\current), 99% of modern tools (Gradle, Maven, IDEs) can natively resolve the path entirely in the background.
However, some ultra-legacy enterprise Java applications or obscure classloaders perform strict canonical path resolution that can occasionally fail to traverse Windows Directory Junctions. To ensure 100% unbreakable compatibility for all workflows, we built a Dual-Architecture Core.
By navigating to the Settings menu, users can freely toggle between the two modes:
| Mode | Mechanism | Privileges Required | Legacy App Compatibility |
|---|---|---|---|
| Symlink Mode (Default) | Dynamically updates a junction pointer in your User PATH. |
Standard User (UAC-Free) | Extremely High (99%) |
| Registry Mode (Legacy) | Hardcodes absolute paths directly into the Machine HKLM Registry. |
Administrator (Prompts UAC) | 100% Unbreakable |
Warning
Architecture Conflicts: Windows evaluates Machine (HKLM) paths before User (HKCU) paths. If you use Registry Mode (which writes to the Machine level) and later switch back to Symlink Mode (which writes to the User level), the old Machine path would normally stubbornly override your new Symlink! To prevent this, toggling back to Symlink Mode inside the Settings Menu will now automatically scrub the legacy Machine pollution for you. (Note: If you manually bypass the menu using --legacy and --symlink CLI flags and experience an override, simply run jvm clear to wipe the slate).
You can even override your global setting dynamically on a per-command basis using the --symlink or --legacy CLI flags (e.g., jvm 21 --legacy).
DiamTek JVM features a built-in Dual Update Channel Engine that gives developers, DevOps engineers, and enterprise teams complete control over update cadences, release stability, and preview features.
| Feature / Property | π’ [Stable] Channel (Recommended) |
π£ [Nightly] Channel (Cutting-Edge) |
|---|---|---|
| Release Target | Official, tagged GitHub releases (releases/latest) |
Tip of the repository's main branch (HEAD) |
| ANSI Terminal Badge | Green ([Stable]) across menus, cards, and CLI |
Bright Purple ([Nightly]) across menus, cards, and CLI |
| Release Cadence | Thoroughly vetted milestones (v1.0.0, v1.1.0) |
Continuous β immediate access upon commit merge |
| Cryptographic Trust | Validated against official SHA256SUMS.txt digests |
Tracked via Git Commit SHA & computed SHA-256 hash |
| Downgrade Safety | Refuses to downgrade unreleased local development builds | Refuses to downgrade local builds ahead of main |
| Offline / Rate-Limit | Automated HTTP 302 web redirect fallback (no 403s) | Direct Fastly CDN-backed raw endpoints (no 403s) |
| Ideal For | Primary workstations, production fleets, CI/CD | Contributors, beta testers, previewing new scrapers |
-
View Active Channel:
jvm channel
Displays your current active channel (
[Stable]or[Nightly]), description, and available channel switches. -
Switch to Stable Channel (Recommended):
jvm channel stable
-
Switch to Nightly Channel:
jvm channel nightly
-
One-Off Command Overrides: Override the active channel for a single update run without modifying your saved configuration:
jvm self-update --nightly jvm self-update --stable jvm self-update --channel nightly
-
Interactive Menu Toggle: Run
jvmwithout arguments, enter Settings (3), and select Option 4 (Update Channel: [...] - Click to switch).
- Cryptographic SHA-256 Verification: When updating on the
[Stable]channel, JVM downloadsSHA256SUMS.txtfrom the official release assets and verifies the SHA-256 hash ofinstall.ps1before execution. Any checksum mismatch immediately terminates the update to prevent supply chain tampering. - Ahead-of-Remote Protection (Downgrade Prevention): JVM parses and compares both the Semantic Version (
v!JVM_VERSION!) and Build Number (Build !JVM_BUILD!). If you are running an unreleased local build ahead of official releases or ahead ofmain, JVM alerts you with[ INFO ]and safely blocks accidental downgrades. - Rate-Limit Safe Fallback: Unauthenticated GitHub API calls are capped at 60 requests/hour per IP. JVM incorporates an automated non-blocking fallback architecture (using Fastly CDN raw endpoints and GitHub web redirects) so update checks never crash with
403 Forbidden.
DiamTek JVM is engineered for real-world enterprise IT environments, strict security compliance standards (SecOps/EDR), and frictionless cross-platform engineering team onboarding.
-
Zero Admin Rights Required (Zero IT Helpdesk Tickets)
- The Enterprise Bottleneck: On locked-down corporate laptops, developers lack local administrator privileges (
UAC). Traditional JDK installers write toC:\Program Filesand machine-level registry keys, requiring IT helpdesk tickets for every routine Java or build tool update. - The JVM Solution: DiamTek JVM installs into user space (
%LOCALAPPDATA%\DiamTek\JVM) and switches active versions using user-mode NTFS Directory Junctions (current). Version switching requires 0 UAC prompts, 0 admin credentials, and 0 IT tickets. Developers control their toolchains independently while corporate endpoint policies remain intact.
- The Enterprise Bottleneck: On locked-down corporate laptops, developers lack local administrator privileges (
-
Mixed-OS Team Onboarding (
.sdkmanrc&.java-versionParity)- Cross-Platform Repositories: Modern engineering teams rarely use homogeneous operating systems. Repositories committed by macOS/Linux developers standardizing on SDKMAN! include
.sdkmanrcor.java-versionfiles. - Native Windows Parity: Windows engineers run
jvminside any repository, and the engine automatically parses the file, translates SDKMAN! vendor strings (-tem,-amzn,-graal) to native Windows JDKs, and isolates required versions of Maven, Gradle, Kotlin, Scala, and Groovy in active session memory. No WSL virtualization overhead, no Git Bash quirks, and zero cross-platform friction.
- Cross-Platform Repositories: Modern engineering teams rarely use homogeneous operating systems. Repositories committed by macOS/Linux developers standardizing on SDKMAN! include
-
Turnkey Fleet Management (Intune, MECM / SCCM, Group Policy)
- Silent Enterprise Distribution: Shipped with pre-compiled, standalone WiX Toolset v4 MSIs (
x64andARM64) embedding all cabinet payloads. - Unattended Rollout: Deploys silently via standard system management tools:
msiexec /i jvm-windows-1.0.0-x64.msi /qn /norestart - Deterministic Fleet Telemetry: Built with strict standard exit codes (
0Success,1Abort/Error,1602Canceled,1603Fatal) and deterministic registry detection rules (HKCU\Software\DiamTek\JVM, DWORDinstalled=1) for Microsoft Intune / MECM application packaging.
- Silent Enterprise Distribution: Shipped with pre-compiled, standalone WiX Toolset v4 MSIs (
-
SecOps, EDR & Audit Compliance
- Zero-File In-Memory UAC Elevation: Never drops temporary
.bator.ps1files into%TEMP%. Administrative operations execute in-memory via parameterized PowerShell process APIs, eliminating Time-of-Check to Time-of-Use (TOCTOU) race conditions and Local Privilege Escalation (LPE) flags from corporate EDR agents (CrowdStrike, Microsoft Defender for Endpoint). - No 1024-Character PATH Truncation: Completely avoids legacy
setx.exebuffer overruns by performing all environment modifications through infinite-length.NETenvironment APIs. - Cryptographic Provenance Attestation: Official release binaries are cryptographically signed and attested via GitHub Sigstore OIDC (
actions/attest-build-provenance). SecOps teams can verify binary authenticity directly against the source Git commit SHA usinggh attestation verify. - Corporate Proxy & CA Integration: Inherits system WinINet proxy settings, supports authenticated proxy variables (
HTTP_PROXY,HTTPS_PROXY), and automatically trusts corporate root certificates (Zscaler, Netskope, Palo Alto) via the Windows Certificate Store.
- Zero-File In-Memory UAC Elevation: Never drops temporary
Despite being nearly 100 KB in size, the jvm.bat engine is mathematically optimized to bypass the notorious bottlenecks and memory leaks of standard Windows Batch scripts:
- Zero Label-Scanning Latency: Standard scripts suffer severe performance penalties when using
call :labelfor high-frequency loops (becausecmd.exesearches the file linearly from top to bottom). Our heaviest logic, such as the multi-vendor Semantic Bubble Sort algorithm, is written as a strictly in-memory inline array swapper, ensuring instantaneous sorting regardless of file size. - Leak-Proof
SETLOCALBoundaries: We completely sidestepped the dreadedMaximum setlocal recursion level reachedcrash. Every single utility function explicitly pops its scope boundary back to the system using terminalexit /bunwinds, guaranteeing zero memory leaks across thousands of loop iterations. - Bulletproof Escape Boundaries: We utilize hexadecimal parsing and dedicated PowerShell payloads (
$null) to ensure thatcmd.exenever accidentally swallows caret characters (^), exclamation marks (!), or spaces when resolving UAC-elevated registry wrappers in the background. - Quote-Safe PATH Export: All
for /floops that transfer variables acrosssetlocal/endlocalboundaries use a double-quote encapsulation strategy (""!VAR!""with%%~Astripping) to guarantee safe handling ofPATHstrings containing embedded double-quotes β a common Windows scenario that normally causescmd.exeto misinterpret path segments as filenames.
| Requirement | Specification | Notes |
|---|---|---|
| OS | Windows 10 or Windows 11 | Full support for x64 and native ARM64 detection. |
| Privileges | Standard User | UAC is bypassed by default via the Symlink Architecture. Admin is only required for legacy Registry Mode. |
| Dependencies | None | Runs purely on native CMD and PowerShell. No WSL, Cygwin, or MSYS2 required. |
For deep technical details, CI/CD automation, and advanced usage, refer to the official documentation:
| Document | Description |
|---|---|
| Installation Guide | PowerShell one-liners, Package Managers, MSI standalone installers, Enterprise Fleet Deployment (Intune/MECM), and WiX v4 build pipeline. |
| Usage Guide | Semantic routing, .java-version isolation, BYO-JDK, and Ecosystem commands. |
| Architecture | Technical deep-dive into Directory Junctions and PowerShell Native execution. |
| SDKMAN! Comparison | Why this is the premier native alternative to SDKMAN! for Windows. |
| FAQ | Common questions about UAC-free zero-admin usage, enterprise proxies, global routing, and Windows Registry bridging. |
| Changelog | Detailed chronological release history and bug fixes. |
| Support & Help | Where to get help, ask questions, Discord community, and issue reporting channels. |
| Contributing Guide | Development workflow, pull requests, issue templates, and coding standards. |
| Code of Conduct | Standards, pledge, and reporting procedures for healthy community interaction. |
| Security Policy | Vulnerability reporting procedures, supported versions, and response SLAs. |
- Launch
jvm.batto open the interactive menu, or run it from any terminal. - Navigate to Settings (Global Command & Setup) to install the
jvmglobal command. - Once installed globally, you can use the following commands from anywhere:
Instantly update your JAVA_HOME and system PATH without opening menus. If there are duplicates, you will be prompted to pick a vendor.
| Command | Action / Description |
|---|---|
jvm 21 |
Switch to JDK 21 globally. |
jvm use 21 |
Switch to JDK 21 globally (SDKMAN/nvm compatible alias). |
jvm default 21 |
Set default JDK 21 globally (SDKMAN alias). |
jvm 21 --session |
Switch locally for the current terminal only (requires PowerShell Profile hook). |
jvm 21 --symlink |
Force switch using Symlink Mode (UAC-Free) for this command. |
jvm 21 --legacy |
Force switch using Registry Mode (Requests UAC) for this command (alias: --registry). |
jvm 21 --vendor adoptium |
Override priority and explicitly switch to Adoptium's JDK 21. |
jvm latest |
Dynamically switch to the absolute highest installed JDK version. |
jvm lts |
Dynamically switch to the highest installed LTS version. |
jvm pin [version] |
Lock or inspect directory-level .java-version (jvm local). |
jvm exec <ver> [--] <cmd> |
Execute command in ephemeral isolated JDK subshell without changing global state (jvm run). |
jvm |
Silently parses .java-version and auto-switches locally (or opens UI if missing). |
jvm --global |
Parses .java-version and forces the switch globally to your registry. |
Note on
.java-version: Your file can contain inline CLI flags (e.g.,21 --vendor adoptium --legacy). Make sure the version and flags are on a single line. Architecture flags (--legacy) only apply when usingjvm --global.
| Command | Action / Description |
|---|---|
jvm install |
Opens the fully interactive Installation Wizard UI. |
jvm install 21 |
Initiates the installation of JDK 21 (pauses to prompt for Vendor). |
jvm install 21 --vendor oracle |
Bypasses all prompts to silently download and install Oracle JDK 21. |
jvm install lts |
Prompts you to pick a supported LTS version (17, 21, 25), then prompts for Vendor. |
jvm install lts --latest |
Locks onto the highest available LTS, but still pauses for Vendor prompt. |
jvm install lts --latest --vendor oracle |
100% automated headless installation of the newest Oracle LTS version. |
jvm install 17 --vendor oracle -y |
Aggressively bypasses all safety warnings (caps, overwrites) for CI/CD automation. |
jvm install 21 --skip-checksum |
Bypasses checksum verification if hash is unavailable or unresolvable. |
JVM supports downloading, switching, and managing tools natively alongside Java. You can manage these via the command line or through the interactive Ecosystem Management sub-menu (Option 2 in the main UI).
| Command | Action / Description |
|---|---|
jvm install maven [latest] |
Installs Maven directly from Apache (omitting version defaults to latest; e.g., jvm install scala). |
jvm install gradle 8.9 |
Installs a specific version of Gradle. |
jvm kotlin 2.0.20 |
Instantly switches your active KOTLIN_HOME (and PATH) to the specified version. |
jvm list |
Lists Ecosystem tools and their currently [ACTIVE] versions at the bottom. |
jvm uninstall groovy [version] |
Safely uninstalls the tool; auto-selects if one version is installed, or prompts with an interactive list if multiple. |
| Command | Action / Description |
|---|---|
jvm update <version> |
Automatically checks and updates a specific installed JDK (e.g., jvm update 21). |
jvm update --all |
Silently patches all installed JDKs and Ecosystem Tools to their newest releases. |
jvm update --all --vendor oracle |
Silently checks and automatically patches only your Oracle JDKs. |
jvm uninstall <version> |
Headless uninstallation for a JDK (aliases: jvm rm <version>, jvm remove <version>). |
jvm uninstall <version> --vendor oracle |
100% headless uninstallation targeting Oracle (bypasses all prompts). |
jvm (no args) |
Opens the interactive terminal dashboard (access interactive Uninstaller and Updater sub-menus). |
| Command | Action / Description |
|---|---|
jvm list |
Lists all installed JDKs (version, vendor, path), highlighting the [ACTIVE] one (alias: jvm ls). |
jvm current |
Displays comprehensive status card: active JDK, switching mode, junction target, and tools (aliases: jvm status, jvm info, jvm whoami, jvm env). |
jvm which [candidate] |
Prints absolute filesystem path to active java.exe or ecosystem binary (alias: jvm path). |
jvm doctor |
Deep diagnostic health audit and conflict scanner (permissions, junctions, PATH shadowing, hooks; alias: jvm check). |
jvm hook [action] |
Manage PowerShell profile auto-sync wrapper hook (install, setup, status, check, remove, uninstall). |
jvm open [candidate] |
Instantly opens candidate (maven, gradle), installed JDK version (21), candidates, or root in File Explorer (alias: jvm home). |
jvm clean |
Safely purges temporary installer caches and extraction artifacts to reclaim disk space (alias: jvm prune). |
jvm clear |
Instantly wipes JAVA_HOME and purges Java from your PATH. |
jvm env |
Displays current environment variables and status card (alias for jvm current). |
jvm link [path] [name] |
Manually links a custom JDK directory (or lists all registered custom links if run with no arguments). |
jvm unlink <name> |
Removes a custom linked JDK. |
jvm version |
Checks your current jvm.bat build number against GitHub for updates (--version, -v). |
jvm channel [stable/nightly] |
View or switch active update channel ([Stable] green vs [Nightly] purple). |
jvm self-update [ch] [-y] |
Automatically downloads and atomic-swaps the core script (stable/nightly, --channel, -c, -y/--yes; alias: jvm update self). |
jvm self-uninstall |
Launches the deep uninstaller with UAC elevation (full system wipe; alias: jvm uninstall-self). |
jvm <command> --no-color |
Suppresses ANSI color codes for clean redirection and CI/CD logs (also honors NO_COLOR env). |
jvm help / --help / /? |
Displays the complete CLI command reference and flag overrides. |
jvm <semantic-alias> |
Routes dynamically (e.g., jvm latest, jvm lts, jvm 21). |
Pro Tip: Use
jvm doctorfor an instant system health and conflict check,jvm currentfor an active environment status card,jvm whichto dynamically feed the activejava.exepath into scripts/IDE configurations, andjvm cleanto sweep orphaned download archives without touching installed runtimes.
The utility uses native ANSI terminal color formatting to protect system stability:
- πΉ Cyan
[ ACTION ]/[ INFO ]β Indicates system operations, network lookups, and diagnostic information. Version numbers are highlighted in cyan for rapid scanning. - πΈ Yellow
[ WARNING ]/[ UPDATE ]β Points out non-critical issues, available patches, or destructive prompts. - πΊ Red
[ ERROR ]β Warns of network failures, blocked file permissions, or locked folders. - π’ Green
[ACTIVE]/[ OK ]/[Stable]β Highlights the JDK entry currently actively powering your terminal environment, signifies a successful operation, or denotes the official Stable update channel. - π£ Purple
[Nightly]β Highlights the cutting-edge Nightly update channel receiving unreleased commits directly from themainbranch. - β½ Gray β Mutes absolute file paths to reduce terminal clutter.
To prevent catastrophic accidental deletions on local filesystems, all critical prompts obey standard developer conventions:
- The uninstaller and update prompts use a strict
(y/N)validation. - Pressing Enter or typing anything other than an explicit
Y/yacts as an immediate safe abort. - Custom loops trap premature
Ctrl+Ccommands gracefully, and auto-close countdowns can be interrupted with any keystroke.
- v1.0.1 (Latest): Stability, reliability, and multi-architecture release. Migrated Windows Package Manager (Winget) to standard multi-file manifests (
DiamTek.JVM.yaml,DiamTek.JVM.installer.yaml,DiamTek.JVM.locale.en-US.yaml) adding native dualarm64andx64architecture distribution. Synchronized package manifests across Scoop (jvm.json), Chocolatey (jvm.nuspec), and Winget. Hardened the installer pipeline against PowerShell 7 byte-array decoding corruption (Invoke-RestMethodreturning raw bytes instead of text) and enforced strict Windows CRLF (\r\n) line ending normalization to eliminatecmd.exelabel offset drift and syntax errors ('f' is not recognized). Added pure .NET cryptographic fallback (Get-FileSha256viaSystem.Security.Cryptography.SHA256) ininstall.ps1andjvm.batresolvingGet-FileHashabsence in minimal or constrained PowerShell 5.1 environments. Engineered CLI update channel override persistence (UPDATE_CHANNEL_OVERRIDE), preserving command-line flags (--channel,-c,--nightly,--stable) across subshell transitions and menu rescan loops without being overwritten by persistentchannel.txt. Added positional channel arguments (jvm self-update nightly),jvm update selfcommand alias, and guarded Nightly SHA-256 hash substring display on unreleased development builds. Hardened MSI installer environment routines to accurately detect, sanitize, and prepend JVM directory paths without duplicating existing PATH entries. Excluded active uninstaller runner scripts (*uninstall*) from%TEMP%cleanup inuninstall.ps1, preventing premature deletion of the running script. Eliminated intermediate batch runner files and obsolete subroutine stack popping injvm.bat, executing uninstallation via an atomic in-memory compound command with direct process exit (& exit) to completely eliminate post-uninstallationThe batch file cannot be found.errors andThe system cannot find the path specified.directory rescan attempts on deleted installations. - v1.0.0: Official General Availability release. Added complete package manager distribution (Scoop, Chocolatey, Winget, and WiX v4 MSI installer). Introduced deep UAC uninstaller engine (
uninstall.ps1), native Windows Settings "Installed apps" integration, Start Menu uninstaller shortcuts, interactive Settings menu uninstaller, andjvm self-uninstallCLI command. Added multi-invocation PowerShell tab completion (Register-ArgumentCompleteracrossjvm,jvm.bat, and.\jvm.batwithchcp 65001profile hardening), developer shorthand aliases (jvm ls,jvm info,jvm whoami,jvm check,jvm prune,jvm env), and full NO_COLOR specification compliance (NO_COLOR=1and--no-colorflag) for clean CI/CD logs. Introduced Dual Update Channel Engine (jvm channel [stable|nightly],--channel,--nightly,--stable, and interactive Settings menu Option 4 toggle) distinguishing official tagged releases (marked green[Stable]) from cutting-edgemainbranch builds (marked purple[Nightly]), with-Channelinstaller parameter support and persistence to%LOCALAPPDATA%\DiamTek\JVM\channel.txt. Implemented enterprise-grade cryptographic SHA-256 verification against official releaseSHA256SUMS.txtdigests, ahead-of-remote downgrade prevention that refuses downgrades when running unreleased local builds, full comparison of both Semantic Version and Build Number (v!JVM_VERSION! (Build !JVM_BUILD!)), and automatic rate-limit safe GitHub API fallback via Fastly CDN endpoints and web redirects. Hardened Universal Candidate Downloader extraction routine against directory traversal vulnerabilities (Zip-Slip) by strictly validating canonical destination paths against extraction boundaries. Added interactive profile reload reminder (. $PROFILE) when configuring the PowerShell profile hook. Documented upstream BellSoft Liberica SHA1 digest constraints in the resolution engine. Expanded upstream vendor support to 8 native distributions with the addition of BellSoft Liberica (Spring Boot / JavaFX, official API discovery, SHA1 verification) and IBM Semeru Runtimes (Eclipse OpenJ9 memory optimization, GitHub API, SHA256 verification), expanded.sdkmanrchijack translations (librca,nik,sem,semeru), and updated CLI help for all 8 vendors. Introduced full suite of developer Quality-of-Life (QoL) commands:jvm doctor(system diagnostic health audit, permissions check, junction integrity, and PATH shadowing detector),jvm exec/jvm run(ephemeral one-off command runner in isolated subshell with exit code propagation),jvm pin/jvm local(instant.java-versionproject lock writer and inspector),jvm open/jvm home(instant Windows File Explorer jump to active candidate, JDK, or storage root),jvm use/jvm default(ergonomic transparent aliases for SDKMAN/nvm workflows), andjvm hook(PowerShell profile auto-sync hook management with status diagnostics and removal). Migrated the entire storage architecture from the user profile to%LOCALAPPDATA%\DiamTek\JVMfor enterprise-grade path compliance. Introduced a bulletproof one-liner installation script (install.ps1) for frictionless setup and automatic code sanitization. Overhauled the Self-Updater to utilize the Universal Candidate Downloader engine, granting it native ANSI progress bars. Fixed critical Windowscmd.exeUTF-8 BOM interpretation bugs and UNIX (LF) line-ending crashes (thechobug) by enforcing explicit CRLF encoding during downloads. Added native terminal code page preservation and restoration to seamlessly handle UTF-8 rendering without corrupting the user's host environment. Hardened the Global Command installer, resolved subshell variable slicing errors, and patched multiple path-parsing faults and update-checker hangs for maximum stability. Massive architecture overhaul: migrated core architecture to use Directory Junctions (%LOCALAPPDATA%\DiamTek\JVM\current), enabling 100% UAC-free, instantaneous version switching that dynamically syncs across all open terminal windows. Built a Dual-Architecture engine, allowing users to seamlessly toggle between the new Symlink Mode and the legacy Registry Mode directly from the Settings Menu. Re-engineered legacy Registry Mode to utilize background PowerShell wrappers, fixing a major historical bug where switching versions would fail silently for non-Admin users. Introduced dynamic Vendor grouping (Oracle, Adoptium, GraalVM, Corretto, Zulu, Microsoft, Liberica, Semeru) across all menus. Built an optimized, strictly in-memory Bubble Sort algorithm to organize JDKs by newest version. Added.java-versionand.sdkmanrcdirectory-based auto-switching (defaults to session-mode isolation) with an explicit--globalCLI override flag, support for passing full CLI flags directly inside.java-version, and a native.sdkmanrcparser to dynamically hijack cross-platform SDKMAN workflows with True Session Isolation across all ecosystem tools. Built a Universal Candidate Engine to natively support the JVM Ecosystem (Maven, Gradle, Kotlin, Scala, Groovy), downloading, extracting, and symlinking binaries with inline progress bars and dynamic SHA256/SHA512 validation (with automatic SHA1 fallback for older Maven legacy endpoints), defaulting version arguments tolateston install (e.g.,jvm install scala), providing smart version auto-detection and interactive numbered menus on uninstall (jvm uninstall <tool>), and implementing zero-quota HTTP 302 redirect fallback for GitHub API rate-limited queries (Maven, Kotlin, Scala). Upgraded Status & Diagnostic Dashboard (jvm current/jvm status/jvm env) with vibrant ANSI color coding for architecture mode ([Symlink Mode]in green,[Registry Mode]in red) and junction link targets highlighted in green. Consolidated the Main Menu into two unified "JDK Management" and "Ecosystem Management" sub-hubs, each mirroring the same "Switch Active" / "Version Management" architecture. Engineered an interactive Ecosystem Auto-Updater with a vendor-selection menu that displays active versions, lets the user check individual tools or all at once, resolves the absolute latest releases from GitHub/Apache APIs, and seamlessly prompts to upgrade out-of-date binaries. Replaced duplicated code in UpdateJDKs and UninstallJDK with a shared generic vendor menu builder for massive code reduction. Enforced consistent, unified UI layouts (--- Manage by Vendor/Tool ---and--- Actions ---) across all JDK and Ecosystem menus. Fixed the notorious Windowssetx1024-character PATH truncation bug by completely replacing all environment variable updates with infinite-length.NETAPI calls. Implemented enterprise-grade SHA256 checksum verification for all JDK downloads using native.NETCryptography APIs to protect against corrupted payloads. Added semantic CLI routing (jvm latest,jvm lts) and flag overrides (--symlink,--legacy,--vendor,--latest,-y). Added ARM64/AArch64 hardware auto-detection, routing all vendor API queries to architecture-specific download endpoints. Built a dynamicFetchLatestVersionsresolver that queries the Adoptium API at runtime to resolve the true latest feature release and LTS version numbers, eliminating hardcoded version constants. Re-engineered theUpdateCheckeras a fully self-contained inline PowerShell script generated at runtime for all eight vendors, removing all external.ps1file dependencies. Added structured offline-aware error handling across all network operations with clean[ ERROR ]/[ DETAIL ]output instead of raw exception dumps. Eliminated hardcoded UI prioritization in favor of interactive vendor-selection prompts. Restored native extraction progress bars (with a forced final 100% frame to fix a rounding edge case) and stabilized interactive installer UI layout. Improved navigation speed via a smart cachingNEEDS_RESCANarchitecture. Fixed cross-architecture registry conflicts between User and Machine environment variables. Fixed UAC elevation deadlocks, delayed expansion engine parsing bugs affecting the--globalflag and exclamation marks, character-encoding path bugs for user profiles, and critical bugs that corrupted paths containing exclamation marks (!). Fixed Oracle update checks crashing with'$' is not recognizedby switching the PowerShell payload to pipe-safe string concatenation. Replaced deprecatedwmicenvironment queries with directreg querycalls for forward compatibility with Windows 11. Hardened allfor /fvariable export loops with double-quote encapsulation to preventcmd.exefrom misinterpretingPATHstrings containing embedded quotes as file lists. Added conditionalrmdirguard to prevent extracted files from being destroyed on move failure. Added arem END OF SCRIPTsentinel integrity check to the self-updater to reject truncated or corrupted downloads. Aligned all UI tags to a strict 10-character padded format. Built a seamless semantic self-updater engine (jvm version,jvm self-update) that securely compares build numbers using the native.NET[version]class before automatically downloading and atomic-swaps the core script. Patched a variable state-leak during cross-menu navigation and stabilized the back-navigation structural loop across all interactive UI hubs. Added comprehensive enterprise documentation suite across six dedicated guides (INSTALLATION.md,USAGE.md,ARCHITECTURE.md,FAQ.md,SDKMAN-Comparison.md,CHANGELOG.md), including Mermaid SVG architecture diagrams, complete IDE integration workflows (IntelliJ IDEA, VS Code, Gradle, Maven), enterprise IT deployment rules (Intune, MECM, GPO, exit codes), in-depth PATH shadowing diagnostics (where.exe java), script unblocking (Unblock-File), and Jekyll Cayman GitHub Pages portal optimization. Hardened engine security by eliminating all temporary script elevation payloads in%TEMP%in favor of direct in-memory parameterized execution (mitigating TOCTOU/LPE vectors), decoupling-yprompt bypass from checksum verification via the new--skip-checksumflag, and sanitizing repository.java-versionand.sdkmanrcparsing against shell metacharacter injection. - v0.5.0: Introduced CLI Quick-Switching (
jvm <version>) for silent background execution. Added Global Command Installer (Settings menu). Overhauled UI with strict ANSI color hierarchy, path muting, and interruptible auto-close countdowns. Hardened UAC elevation and menu scanning against Windows PATH corruption bugs. - v0.4.0: Re-engineered dynamic auto-scanner supporting developer toolkits (Scoop, Gradle, IntelliJ), fast release-file parsing, and a massive architectural UI overhaul for robust sub-menu navigation.
- v0.3.0: Relicensed the project to the GNU Affero General Public License v3.0 (AGPL-3.0).
- v0.2.0: Added intelligent update checker (via HTTP
HEADrequests), "Update All" bulk-patching, and automated directory hot-swapping. - v0.1.1: Patched
PATHvariable corruption bugs and improved delayed-expansion safety protocols during active session switching. - v0.1.0: Initial Release.
Contributions, issues, and feature requests are welcome!
- π Read the Contributing Guide to get started.
- π‘οΈ Review our Security Policy to report vulnerabilities privately.
- π¬ Need help? Check the Support Guide, open an Issue, or reach out on Discord (@thehawk01).
- π Review our Code of Conduct.
Copyright (c) 2026 DiamTek / AlexΓ©y Shishkin.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
- Oracle JDK: Downloads triggered by this tool are subject to the Oracle No-Fee Terms and Conditions (NFTC) or Oracle Technology Network (OTN) license depending on the selected version. End users are solely responsible for compliance with Oracle's licensing terms in their respective environments.
- OpenJDK Distributions: Builds provided by Adoptium (Eclipse Temurin), Amazon Corretto, Microsoft Build of OpenJDK, Azul Zulu, and GraalVM Community Edition are distributed under the GNU General Public License v2 with Classpath Exception (GPLv2+CE).
- JVM Ecosystem Build Tools: Apache Maven, Gradle, Kotlin Compiler, Scala, and Apache Groovy are distributed under the Apache License 2.0.
- Trademarks: Java, OpenJDK, and the Duke mascot are trademarks or registered trademarks of Oracle Corporation. Windows is a registered trademark of Microsoft Corporation. SDKMAN! is an independent project by Marco Vermeulen and community contributors. All other product names, logos, and brands are property of their respective owners and used solely for identification. DiamTek JVM is an independent open-source utility and is not affiliated with, sponsored by, or endorsed by these entities.