From 060dc9baa8385e810f7a2b165389268f22b572dc Mon Sep 17 00:00:00 2001 From: project516 <138796702+Project516@users.noreply.github.com> Date: Sat, 21 Mar 2026 09:58:19 -0500 Subject: [PATCH 1/2] add setup guide in README --- README.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3dab3f..ceb19ad 100644 --- a/README.md +++ b/README.md @@ -1 +1,67 @@ -# JavaAppTemplate \ No newline at end of file +# JavaAppTemplate + +## Setup + +**Requirements** + +- **Java JDK**: Java 8 or newer installed and `JAVA_HOME` configured. + +**Quick start — Terminal** + +Linux / macOS (bash / zsh): + +```bash +# from project root +./gradlew clean build +./gradlew run +``` + +Windows (PowerShell): + +```powershell +# from project root +.\gradlew.bat clean build +.\gradlew.bat run +``` + +Windows (CMD): + +```cmd +cd %~dp0 +gradlew.bat clean build +gradlew.bat run +``` + +Notes: +- `./gradlew run` uses the Gradle `application` plugin (if configured) to run the app. +- To run the produced JAR directly after building: + +```bash +# replace with the actual jar name in build/libs +java -jar build/libs/JavaAppTemplate-all.jar +``` + +**Run tests** + +```bash +# run tests +./gradlew test +``` + +**Run in Visual Studio Code** + +1. Open the project folder in VS Code. +2. Install the **Java Extension Pack** (provides Language Support, Debugger, Maven/Gradle support). +3. Use the **Run and Debug** view to create or start a Java launch configuration, or: + - Open the built-in Terminal (View → Terminal) and run `./gradlew run` (or `gradlew.bat run` on Windows). + - Use the **Gradle Tasks** view (from the sidebar) to run the `run` or `test` tasks. + +**Troubleshooting** + +- If Gradle complains about Java version, ensure `JAVA_HOME` points to a supported JDK and that `java -version` shows the same. +- On Windows, prefer PowerShell or Git Bash for the provided scripts; ensure `gradlew.bat` is executable. +- If you get missing dependency errors, run `./gradlew --refresh-dependencies`. + +**Files** + +See the main entry point at `src/main/java/dev/project516/JavaAppTemplate/Main.java`. \ No newline at end of file From 329af89ad52fc9de9df0e7a406cbb7511e5347f3 Mon Sep 17 00:00:00 2001 From: project516 <138796702+Project516@users.noreply.github.com> Date: Sun, 22 Mar 2026 14:17:11 -0500 Subject: [PATCH 2/2] Update README.md mention sdkman for unix systems explain why java 8 support is kept, but prefer latest lts jdk --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 843cb17..5fe53f0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ SPDX-License-Identifier: MIT **Requirements** - **Java JDK**: Java 8 or newer installed and `JAVA_HOME` configured. + - If your are on a Unix system (MacOS/Linux), [SDKMAN](https://sdkman.io) is a great tool for managing JDKs. + - Also perfer the latest LTS JDK (currently 25) as it has newer features and fixes. + - Java 8 support is kept, because it is hard to find a decive without support for it. **Quick start — Terminal** @@ -65,9 +68,10 @@ java -jar build/libs/JavaAppTemplate-all.jar **Troubleshooting** - If Gradle complains about Java version, ensure `JAVA_HOME` points to a supported JDK and that `java -version` shows the same. + - If you are using SDKMAN run `sdk current java`. - On Windows, prefer PowerShell or Git Bash for the provided scripts; ensure `gradlew.bat` is executable. - If you get missing dependency errors, run `./gradlew --refresh-dependencies`. **Files** -See the main entry point at `src/main/java/dev/project516/JavaAppTemplate/Main.java`. \ No newline at end of file +See the main entry point at `src/main/java/dev/project516/JavaAppTemplate/Main.java`.