Show HN: Jv – A fast CLI tool to switch Java versions on Windows

github.com

2 points by costabrosky 5 hours ago

I've built jv (https://github.com/CostaBrosky/jv ), a simple and fast command-line tool designed specifically to switch Java versions on Windows with a single command.

Unlike manually editing environment variables or relying on complex batch scripts, jv provides a streamlined experience. It permanently modifies JAVA_HOME and PATH system-wide (requiring admin privileges for these commands), ensuring the change is picked up by all applications, including IDEs.

Key features include:

    Beautiful Interactive UI: Navigate and select versions using arrow keys.
    One-Command Switching: jv use 17 or jv switch for interactive mode.
    Auto-Detection: Finds existing Java installations (Oracle, Adoptium, Zulu, etc.).
    Integrated Installer: Easily install new Java versions (currently Adoptium) via jv install.
    Diagnostics & Repair: jv doctor and jv repair help manage your environment.
    Shell Autocomplete: Tab completion for PowerShell.
    Zero Dependencies: Standalone Go executable.
     
While tools like sdkman exist for Unix-like systems, there wasn't a similarly focused and user-friendly solution for Windows. jv aims to fill that gap.

Feedback and contributions are welcome!