tea_demo.mp4
This is a basic Gongfu tea timer application written in Java, with Maven. The following instructions were adapted by my peer CodeByAidan and are quite finnicky. You may need to just run the project in an IDE as javaFX can be a pain.
To run, simply cd into this project directory and then cd into target/
.
cd path/to/gongfuTeaTimer/
cd target/
Then, run the jar file.
java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml -jar .\finalproject-1.0.jar
Replace $PATH_TO_FX
with the path to your JavaFX installation.
Click here to see how to install Maven globally.
To install Maven, first download it here (I recommend the binary zip archive).
Then, unzip the archive.
-
Press Windows key, type
adva
, and click on theView advanced system settings
option. -
In System Properties dialog, select
Advanced
tab and click on theEnvironment Variables...
button. -
In “Environment variables” dialog,
System variables
, click on theNew...
button and add aMAVEN_HOME
variable and point it to the Maven folder. -
In system variables, find
PATH
, click on theEdit...
button. In “Edit environment variable” dialog, click on theNew
button and add this%MAVEN_HOME%\bin\
. -
Open a new command prompt and type
mvn -version
to verify the installation.
C:\Users\mike>mvn --version
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: C:\Apache\Maven
Java version: 21.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-21
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
C:\Users\mike>echo %MAVEN_HOME%
C:\Apache\Maven
C:\Users\mike>
To run using Maven, simply run the following command in the root directory of this project.
cd path/to/finalproject/
mvn package
To build the jar, simply run the following command in the root directory of this project.
cd path/to/finalproject/
mvn clean package
Then, cd into the target directory.
cd target/
Then, run the jar file.
java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml -jar .\finalproject-1.0.jar
Replace $PATH_TO_FX
with the path to your JavaFX installation.