@@ -4,4 +4,74 @@ SPDX-FileCopyrightText: 2026 project516 <project516@project516.dev>
44SPDX-License-Identifier: MIT
55-->
66
7- # JavaAppTemplate
7+ # JavaAppTemplate
8+
9+ ## Setup
10+
11+ ** Requirements**
12+
13+ - ** Java JDK** : Java 8 or newer installed and ` JAVA_HOME ` configured.
14+ - If your are on a Unix system (MacOS/Linux), [ SDKMAN] ( https://sdkman.io ) is a great tool for managing JDKs.
15+ - Also perfer the latest LTS JDK (currently 25) as it has newer features and fixes.
16+ - Java 8 support is kept, because it is hard to find a decive without support for it.
17+
18+ ** Quick start — Terminal**
19+
20+ Linux / macOS (bash / zsh):
21+
22+ ``` bash
23+ # from project root
24+ ./gradlew clean build
25+ ./gradlew run
26+ ```
27+
28+ Windows (PowerShell):
29+
30+ ``` powershell
31+ # from project root
32+ .\gradlew.bat clean build
33+ .\gradlew.bat run
34+ ```
35+
36+ Windows (CMD):
37+
38+ ``` cmd
39+ cd %~dp0
40+ gradlew.bat clean build
41+ gradlew.bat run
42+ ```
43+
44+ Notes:
45+ - ` ./gradlew run ` uses the Gradle ` application ` plugin (if configured) to run the app.
46+ - To run the produced JAR directly after building:
47+
48+ ``` bash
49+ # replace with the actual jar name in build/libs
50+ java -jar build/libs/JavaAppTemplate-all.jar
51+ ```
52+
53+ ** Run tests**
54+
55+ ``` bash
56+ # run tests
57+ ./gradlew test
58+ ```
59+
60+ ** Run in Visual Studio Code**
61+
62+ 1 . Open the project folder in VS Code.
63+ 2 . Install the ** Java Extension Pack** (provides Language Support, Debugger, Maven/Gradle support).
64+ 3 . Use the ** Run and Debug** view to create or start a Java launch configuration, or:
65+ - Open the built-in Terminal (View → Terminal) and run `./gradlew run` (or `gradlew.bat run` on Windows).
66+ - Use the **Gradle Tasks** view (from the sidebar) to run the `run` or `test` tasks.
67+
68+ ** Troubleshooting**
69+
70+ - If Gradle complains about Java version, ensure ` JAVA_HOME ` points to a supported JDK and that ` java -version ` shows the same.
71+ - If you are using SDKMAN run ` sdk current java ` .
72+ - On Windows, prefer PowerShell or Git Bash for the provided scripts; ensure ` gradlew.bat ` is executable.
73+ - If you get missing dependency errors, run ` ./gradlew --refresh-dependencies ` .
74+
75+ ** Files**
76+
77+ See the main entry point at ` src/main/java/dev/project516/JavaAppTemplate/Main.java ` .
0 commit comments