-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-gui.sh
More file actions
executable file
·51 lines (40 loc) · 1.29 KB
/
Copy pathrun-gui.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1.29 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
#!/bin/bash
# Design Patterns GUI Showcase Launcher
# This script compiles and runs the interactive GUI demonstration
echo "🎯 Design Patterns Interactive Showcase"
echo "========================================"
# Check if Java is installed
if ! command -v java &> /dev/null; then
echo "❌ Java is not installed or not in PATH"
echo "Please install Java 8 or higher to run this application"
exit 1
fi
# Check if javac is installed
if ! command -v javac &> /dev/null; then
echo "❌ Java compiler (javac) is not installed or not in PATH"
echo "Please install JDK to compile and run this application"
exit 1
fi
echo "☕ Java version:"
java -version
echo ""
echo "🔨 Compiling Java files..."
# Create bin directory if it doesn't exist
mkdir -p bin
# Compile all Java files
find src -name "*.java" -print0 | xargs -0 javac -d bin -cp src
if [ $? -eq 0 ]; then
echo "✅ Compilation successful!"
echo ""
echo "🚀 Starting GUI application..."
echo " Close the application window to exit"
echo ""
# 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"
exit 1
fi