-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-gui.bat
More file actions
59 lines (48 loc) · 1.35 KB
/
Copy pathrun-gui.bat
File metadata and controls
59 lines (48 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@echo off
REM Design Patterns GUI Showcase Launcher for Windows
REM This script compiles and runs the interactive GUI demonstration
echo 🎯 Design Patterns Interactive Showcase
echo ========================================
REM Check if Java is installed
java -version >nul 2>&1
if %errorlevel% neq 0 (
echo ❌ Java is not installed or not in PATH
echo Please install Java 8 or higher to run this application
pause
exit /b 1
)
REM Check if javac is installed
javac -version >nul 2>&1
if %errorlevel% neq 0 (
echo ❌ Java compiler (javac) is not installed or not in PATH
echo Please install JDK to compile and run this application
pause
exit /b 1
)
echo ☕ Java version:
java -version
echo.
echo 🔨 Compiling Java files...
REM Create bin directory if it doesn't exist
if not exist bin mkdir bin
REM Compile all Java files
for /r src %%f in (*.java) do (
javac -d bin -cp src "%%f"
)
if %errorlevel% equ 0 (
echo ✅ Compilation successful!
echo.
echo 🚀 Starting GUI application...
echo Close the application window to exit
echo.
REM Run the GUI application
java -cp bin gui.DesignPatternShowcase
echo.
echo 👋 Thanks for exploring Design Patterns!
) else (
echo ❌ Compilation failed!
echo Please check the error messages above and fix any issues
pause
exit /b 1
)
pause