$ show ystyle/jvms
JVMS (JDK Version Manager) is a Windows-specific CLI tool for managing multiple JDK installations. It allows users to install, switch between, and manage different JDK versions from various distributions (Oracle, Amazon Corretto, Adoptium, Azul Zulu). The application features both command-line and text-based user interfaces, modifies system environment variables (JAVA_HOME, PATH) to make JDKs available, and uses a symlink mechanism for persistent JDK switching across console sessions and reboots. Built in Go with a modular architecture, it separates concerns into command handling, data models, UI components, and utility packages for file operations, web downloads, and JDK provider management.
The LLM identified 4 files worth highlighting for reuse:
Provides self-contained file utility functions including a robust Unzip implementation that properly handles directories and files, ReadLines for reading file contents, Exists for file existence checks, and GetCurrentPath for locating the executable directory. Zero internal dependencies make this highly reusable.
Contains the GetJavaHome function that locates the Java home directory by finding javac.exe in a JDK temporary directory. This isolated utility has zero internal dependencies and demonstrates a clean approach to Java environment detection that could be reused in any Java-related tooling.
Implements web utilities including SetProxy for proxy configuration, Download with progress bar functionality, GetJDK for JDK-specific downloads, and helper functions for retrieving URL content. Only depends on an external progress bar package, making it mostly self-contained and extractable for HTTP download needs in other projects.
Defines a clean jdkProvider interface and demonstrates a plugin architecture for JDK version sources (Adoptium, Azul, original index). The ConfiguredFunctions shows how to compose providers. This pattern is easily reusable for any version management system by defining a simple version struct and implementing the Fetch method.