diff options
Diffstat (limited to 'run.bat')
| -rw-r--r-- | run.bat | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -0,0 +1,16 @@ | |||
| 1 | @echo off | ||
| 2 | :: clean old binaries | ||
| 3 | rmdir /s /q bin | ||
| 4 | mkdir bin | ||
| 5 | |||
| 6 | :: compile source files and include libraries | ||
| 7 | javac -d "bin/classes" -cp "lib/*" src/main/java/com/example/App.java | ||
| 8 | |||
| 9 | :: run the application if compilation succeeded | ||
| 10 | if %errorlevel% equ 0 ( | ||
| 11 | echo --- Running Application --- | ||
| 12 | java -cp "bin/classes;lib/*" com.example.App | ||
| 13 | ) else ( | ||
| 14 | echo Compilation failed. | ||
| 15 | ) | ||
| 16 | pause | ||