OCR/run_java.bat
2025-05-13 11:07:14 +08:00

24 lines
678 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001
title OCR监控工具
cd /d "%~dp0"
echo 正在启动OCR监控工具...
REM 检查jar文件
if not exist "target\image-ocr-monitor-1.0-SNAPSHOT-jar-with-dependencies.jar" (
echo 错误: 未找到jar文件请先运行re-build-start.bat进行编译
pause
exit /b 1
)
echo 正在启动Java程序...
echo 使用的tessdata目录: %~dp0tessdata
java -Dfile.encoding=UTF-8 -Dfile.client.encoding=UTF-8 -Dtessdata.path="%~dp0tessdata" -Duser.language=zh -Duser.country=CN -jar target\image-ocr-monitor-1.0-SNAPSHOT-jar-with-dependencies.jar
if errorlevel 1 (
echo 错误: 程序运行出错,请检查日志
pause
exit /b 1
)
pause