File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # JavaAppTemplate
1+ # JavaAppTemplate
2+
3+ ## Setup
4+
5+ ** Requirements**
6+
7+ - ** Java JDK** : Java 8 or newer installed and ` JAVA_HOME ` configured.
8+
9+ ** Quick start — Terminal**
10+
11+ Linux / macOS (bash / zsh):
12+
13+ ``` bash
14+ # from project root
15+ ./gradlew clean build
16+ ./gradlew run
17+ ```
18+
19+ Windows (PowerShell):
20+
21+ ``` powershell
22+ # from project root
23+ .\gradlew.bat clean build
24+ .\gradlew.bat run
25+ ```
26+
27+ Windows (CMD):
28+
29+ ``` cmd
30+ cd %~dp0
31+ gradlew.bat clean build
32+ gradlew.bat run
33+ ```
34+
35+ Notes:
36+ - ` ./gradlew run ` uses the Gradle ` application ` plugin (if configured) to run the app.
37+ - To run the produced JAR directly after building:
38+
39+ ``` bash
40+ # replace with the actual jar name in build/libs
41+ java -jar build/libs/JavaAppTemplate-all.jar
42+ ```
43+
44+ ** Run tests**
45+
46+ ``` bash
47+ # run tests
48+ ./gradlew test
49+ ```
50+
51+ ** Run in Visual Studio Code**
52+
53+ 1 . Open the project folder in VS Code.
54+ 2 . Install the ** Java Extension Pack** (provides Language Support, Debugger, Maven/Gradle support).
55+ 3 . Use the ** Run and Debug** view to create or start a Java launch configuration, or:
56+ - Open the built-in Terminal (View → Terminal) and run `./gradlew run` (or `gradlew.bat run` on Windows).
57+ - Use the **Gradle Tasks** view (from the sidebar) to run the `run` or `test` tasks.
58+
59+ ** Troubleshooting**
60+
61+ - If Gradle complains about Java version, ensure ` JAVA_HOME ` points to a supported JDK and that ` java -version ` shows the same.
62+ - On Windows, prefer PowerShell or Git Bash for the provided scripts; ensure ` gradlew.bat ` is executable.
63+ - If you get missing dependency errors, run ` ./gradlew --refresh-dependencies ` .
64+
65+ ** Files**
66+
67+ See the main entry point at ` src/main/java/dev/project516/JavaAppTemplate/Main.java ` .
You can’t perform that action at this time.
0 commit comments