-
Ensure Java 21 (or later) is installed on your system.
- Verify using the command:
java -version
- Example output:
java version "21.0.5"
- Verify using the command:
-
Ensure Maven is installed and configured.
- Verify using the command:
mvn -v
- Example output:
Apache Maven 3.9.9 Java version: 21.0.5
- Verify using the command:
-
Navigate to the root directory of the project:
cd C:\Users\[user]\[dir]\OnlineResourceManagementSys
Replace
[user]
with your username and[dir]
with the parent directory of the project. -
Run the following Maven command to compile the application:
mvn compile
- This will compile all the source files into
.class
files located in thetarget/classes/
directory.
- This will compile all the source files into
-
Run the following Maven command to package the application into a JAR file:
mvn package
-
This will create a runnable JAR file at:
target/OnlineResourceManagementSys-0.0.1-SNAPSHOT.jar
-
Navigate to the
target
directory:cd target
-
Run the application using the following command:
java -jar OnlineResourceManagementSys-0.0.1-SNAPSHOT.jar
-
Data Storage:
- User and resource data are stored in
.ser
files under thedata/
directory:- Users:
data/users/*.ser
- Resources:
data/resources/*.ser
- Users:
- Encryption keys are stored in
data/secretKey.ser
.
- User and resource data are stored in
-
Testing:
- Unit tests are included in the project and can be run with the following command:
mvn test
- Test results are available in
target/surefire-reports/
.
- Unit tests are included in the project and can be run with the following command:
-
Dependencies:
- External dependencies are bundled into the runnable JAR file. There’s no need to install them separately.
-
If the application does not start, ensure the following:
- Java 21 is correctly installed and configured.
- The
OnlineResourceManagementSys-0.0.1-SNAPSHOT.jar
file exists in thetarget
directory.
-
If issues persist, clean and rebuild the project:
mvn clean package
-
Compile the application:
mvn compile
-
Package the application:
mvn package
-
Run the application:
java -jar target/OnlineResourceManagementSys-0.0.1-SNAPSHOT.jar
Prepared by: Eric Muganga
Date: 22/11/2024