@echo off
REM CMD Java Environment Switch - {{env_name}}
REM Generated by fnva

REM Set new JAVA_HOME
set "JAVA_HOME={{escape_backslash java_home}}"

REM Set fnva environment tracking
set "FNVA_CURRENT_JAVA={{env_name}}"
set "FNVA_ENV_TYPE=Java"

REM Update PATH to include Java bin
if defined FNVA_JAVA_BIN call set "PATH=%%PATH:%FNVA_JAVA_BIN%;=%%"
set "FNVA_JAVA_BIN={{escape_backslash java_bin}}"
set "PATH=%FNVA_JAVA_BIN%;%PATH%"

REM Verify the switch
echo ✓ Switched to Java: {{env_name}}
