29 lines
714 B
Batchfile
29 lines
714 B
Batchfile
@echo off
|
|
REM Build script - compiles both CLI and GUI
|
|
REM Requires JDK 8+ on PATH
|
|
|
|
setlocal
|
|
|
|
where javac >nul 2>&1
|
|
if %errorlevel% neq 0 (
|
|
REM try common Temurin location
|
|
if exist "C:\Program Files\Eclipse Adoptium\jdk-8.0.504.1-hotspot\bin\javac.exe" (
|
|
set "PATH=C:\Program Files\Eclipse Adoptium\jdk-8.0.504.1-hotspot\bin;%PATH%"
|
|
)
|
|
)
|
|
|
|
echo Compiling DuplicateFinder.java and DuplicateFinderGUI.java...
|
|
javac -d . DuplicateFinder.java DuplicateFinderGUI.java
|
|
if %errorlevel% neq 0 (
|
|
echo Build FAILED
|
|
exit /b 1
|
|
)
|
|
echo Build OK
|
|
dir *.class
|
|
echo.
|
|
echo Run CLI: java DuplicateFinder --help
|
|
echo Run GUI: java DuplicateFinderGUI
|
|
echo Run GUI via CLI: java DuplicateFinder --gui
|
|
|
|
endlocal
|