You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
slms/scripts/init_database.bat

32 lines
776 B

@echo off
chcp 65001 >nul
echo ========================================
echo SLMS Database Initialization
echo ========================================
echo.
set JAVA_HOME=E:\2025-2026\GitAIOps\jdk
set PATH=%JAVA_HOME%\bin;%PATH%
echo Compiling project...
call mvn clean compile -q
if %errorlevel% neq 0 (
echo Compilation failed!
pause
exit /b 1
)
echo.
echo Initializing database...
echo.
for /f "delims=" %%i in ('dir /b /s "%USERPROFILE%\.m2\repository\org\xerial\sqlite-jdbc\3.36.0.3\sqlite-jdbc-3.36.0.3.jar" 2^>nul') do set SQLITE_JAR=%%i
"%JAVA_HOME%\bin\java.exe" -Dfile.encoding=UTF-8 -cp "target/classes;%SQLITE_JAR%" com.smartlibrary.InitDatabase
echo.
echo Database file: library.db
echo Shared by CLI, GUI, Web, and Android apps.
echo.
pause