@echo off
chcp 65001 > nul

setlocal

set "APP_NAME=zhmes-agecal-3.5.0.jar"

echo Stopping %APP_NAME% ...

for /f "tokens=1-2" %%i in ('jps -l ^| find "%APP_NAME%"') do (
    echo Killing process: %%i %%j
    taskkill /F /PID %%i
)

timeout /t 3 /nobreak > nul

echo Service stopped.

endlocal