This tends to give a "Can not locate symbol" error for i while in the if statement. Although we Earlier declared i, that declaration is barely in scope:GetJavaVersion established "JavaVersion=" if "%~1"=="" ( set /p JavaVersion="Kind the major java Variation amount you should change to: " ) else ( established /a JavaVersion="%~one" ) exit /b rem Up