diff options
| author | Kostya <mail@sartin.in> | 2026-07-24 21:45:17 +0000 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-07-24 21:45:17 +0000 |
| commit | 5504ca88e98f8451a6dc1c719862f32ca54bfc50 (patch) | |
| tree | eddccf84e88009816d6d8646ef8cd1659bf33efd | |
| download | java-bootstrap-5504ca88e98f8451a6dc1c719862f32ca54bfc50.tar.gz java-bootstrap-5504ca88e98f8451a6dc1c719862f32ca54bfc50.tar.xz java-bootstrap-5504ca88e98f8451a6dc1c719862f32ca54bfc50.zip | |
initial commit
| -rw-r--r-- | .gitignore | 15 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | run.bat | 16 | ||||
| -rw-r--r-- | run.sh | 12 | ||||
| -rw-r--r-- | src/confing.properties | 0 |
5 files changed, 44 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b63bf17 --- /dev/null +++ b/.gitignore | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # Ignore compiled Java bytecode | ||
| 2 | bin/ | ||
| 3 | *.class | ||
| 4 | |||
| 5 | # Ignore packaged binaries | ||
| 6 | *.jar | ||
| 7 | *.war | ||
| 8 | |||
| 9 | # Ignore OS-specific files | ||
| 10 | .DS_Store | ||
| 11 | Thumbs.db | ||
| 12 | |||
| 13 | # Optional: Ignore environment properties if they hold local secrets | ||
| 14 | # config.properties | ||
| 15 | |||
diff --git a/README.md b/README.md new file mode 100644 index 0000000..091c160 --- /dev/null +++ b/README.md | |||
| @@ -0,0 +1 @@ | |||
| New java project bootstrap | |||
| @@ -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 -cp "lib/*" src/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;lib/*" com.example.App | ||
| 13 | ) else ( | ||
| 14 | echo Compilation failed. | ||
| 15 | ) | ||
| 16 | pause | ||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # clean up | ||
| 4 | rm -rf bin && mkdir bin | ||
| 5 | |||
| 6 | # run the app if compilation succeeded | ||
| 7 | if javac -d bin -cp "lib/*" src/com/example/App.java; then | ||
| 8 | echo "--- Running Application ---" | ||
| 9 | java -cp "bin:lib/*" com.example.App | ||
| 10 | else | ||
| 11 | echo "Compilation failed." | ||
| 12 | fi | ||
diff --git a/src/confing.properties b/src/confing.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/confing.properties | |||