This is a project template for a greenfield Java project called Lumi. Given below are instructions on how to use it.
Prerequisites: JDK 25, update Intellij to the most recent version.
- Open Intellij (if you are not in the welcome screen, click
File>Close Projectto close the existing project first) - Open the project into Intellij as follows:
- Click
Open. - Select the project directory, and click
OK. - If there are any further prompts, accept the defaults.
- Click
- Configure the project to use JDK 25 (not other versions) as explained in here.
In the same dialog, set the Project language level field to theSDK defaultoption. - After that, locate the
src/main/java/lumi/Lumi.javafile, right-click it, and chooseRun Lumi.main()(if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o _ _ _ __ __ ___ | | | | | | \/ |_ _| | | | | | | |\/| || | | |___ | |_| | | | || | |_____| \___/|_| |_|___| Hi there! I'm Lumi, your bright and bubbly chat buddy! I'm popping in to sprinkle a little cheer your way. o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o That's all for now - thanks for stopping by! Stay sparkly, and come chat again soon! o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o~o
Warning: Keep src/main/java as the source root for all Java packages. Do not move the lumi package outside this folder, because build tools such as Gradle expect this standard layout.
The Shadow plugin packages Lumi and all of its runtime dependencies into one executable file named lumi.jar. Ensure that java -version reports Java 25 before building or running it.
From the project root, run the following command on Windows:
.\gradlew.bat shadowJarOn macOS or Linux, run:
./gradlew shadowJarThe completed JAR is created at build/libs/lumi.jar. The normal Gradle build task also creates this JAR because the Shadow task is connected to the build lifecycle.
To run Lumi from the project root on Windows:
java -jar build\libs\lumi.jarOn macOS or Linux:
java -jar build/libs/lumi.jarLumi stores tasks in data/lumi.txt relative to the directory from which the command is run. Running the command from the project root therefore keeps the data file in the project's data folder.
In IntelliJ, you can build the same JAR by opening the Gradle tool window, finding the shadowJar task, and running it. Refresh the project view afterward if the build folder is not immediately visible.