A C++ tool called java-version reads the Java installation's release file directly instead of spawning a java -version process, reducing version lookup time from ~20ms to under 1ms (21x faster). The implementation uses C++17 filesystem APIs to locate and parse the release file in the Java installation directory. Benchmarks using hyperfine on an M5 MacBook Pro confirm the speedup.
Sort: