- Name: Sean Atherton
- Student Number: s3893785
- Student Email: s3893785@student.rmit.edu.au
- openjdk version "11.0.18" 2023-01-17
- OpenJDK Runtime Environment Temurin-11.0.18+10 (build 11.0.18+10)
- OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode)
- hamcrest-core-1.3
- junit-4.13.2
- sqlite-jdbc-3.41.2.1
- JavaFX-11
The workspace contains two folders by default, where:
src
: the folder to maintain sourceslib
: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin
folder by default.
-
To get started, you need to extract the compressed file to a directory of your choice.
-
To compile the program, open a command prompt and navigate to the programs directory. For example, if the program is on the Desktop you would type:
cd C:\Users\yourusername\Desktop\MyHealth
Remember to replace C:\Users\mrsti\Desktop\MyHealth with the actual path of your program folder.
-
Now, you can compile all the Java files at once using the javac command. The -cp option is used to specify the classpath, and . means the current directory. src*.java is a wildcard that matches all .java files in the 'src' directory.External .jar files are located in the lib folder of the program. Here's how you can compile by entering the following into the command prompt. *Navigate to your project directory
-
Generate the sources.txt file:
dir /s /B src*.java > sources.txt
-
Compile the Java files:
javac -d bin -cp .;lib/* @sources.txt
-
This will compile all the source files and create class files in the bin directory.
-
Navigate to your program directory:
cd C:\Users\yourusername\Desktop\MyHealth
-
Set the PATH_TO_FX environment variable *The PATH_TO_FX environment variable should point to the lib directory of your installed JavaFX SDK. It is used to tell Java where to find the JavaFX modules required to run the program.:
set PATH_TO_FX="C:\Program Files\Eclipse Adoptium\javafx-sdk-11\lib"
-
Run the MyHealth application:
java --module-path %PATH_TO_FX% --add-modules javafx.controls,javafx.fxml,javafx.base,javafx.graphics,javafx.media,javafx.swing,javafx.web -Dprism.order=sw -cp bin;lib/* application.MyHealthTracker
Firstly, the JUnit test classes should be compiled. If they are not yet compiled, you can compile them in a similar way you did with the source files. Assuming they are already in the bin directory, you can run them as follows:
java -cp bin;lib/junit-4.13.2.jar;lib/hamcrest-core-1.3.jar org.junit.runner.JUnitCore test.HealthRecordTest test.UserProfileTest test.UserTest
In case of any issues, confirm you're using the correct versions of JDK, JavaFX, and SQLite JDBC Driver. If the issue persists, refer to the respective software's official documentation
Cheating is a serious offense:
"What happens if you get caught cheating at RMIT? For serious breaches of academic integrity, students can be charged with academic misconduct. Possible penalties > include cancellation of results and expulsion resulting in the cancellation of a student's program."
Academic integrity - RMIT University