This is the group assignment for CZ2002, by Lab Group SE1 Group 1. Instructions on how to use it are given below.
Prerequisites: JDK 11 (Could work on other versions, but mostly tested on JDK 11), update Intellij to the latest version.
- Import the project into Intellij as follows:
- Open IntelliJ (if you are not in the welcome screen, click File → Close Project to close the existing project dialog first).
- Click
Open
. - Select the project directory
SE3-grp1_MySTARS
, and clickOK
. - Accept the defaults if there are any further prompts.
- Set up the correct JDK version, as follows:
- Click
File
>Project Structure
>Project
. - Under Project SDK, select the correct JDK version.
- Click
OK
.
- Click
- Add library to project
- Click
File
>Project Structure
>Modules
and thenDependencies
. - Select
+
icon and thenJARs or Directories...
. - Locate the
lib
folder and select it. - Click
OK
.
- Click
- After the above steps are completed, locate the
src/main/java/mystars/MyStars.java
file, right-click it, and chooseRun MyStars.main()
. If the setup is correct, you should see something like this:------------------------------------------------------------ _______ _______________________ _______ _______ ( )\ /( ____ \__ __( ___ | ____ | ____ \ | () () ( \ / ) ( \/ ) ( | ( ) | ( )| ( \/ | || || |\ (_) /| (_____ | | | (___) | (____)| (_____ | |(_)| | \ / (_____ ) | | | ___ | __|_____ ) | | | | ) ( ) | | | | ( ) | (\ ( ) | | ) ( | | | /\____) | | | | ) ( | ) \ \_/\____) | |/ \| \_/ \_______) )_( |/ \|/ \__|_______) Welcome! Enter Username:
- In Windows
- Locate the project root directory, whose path ends with
MySTARS
. - Type
javac -cp .\lib\*;.\src\main\java -Xlint:none -d .\bin .\src\main\java\mystars\MyStars.java
and press enter to compile the code. - Now, type
java -classpath .\lib\*;.\bin mystars.MyStars
and press enter to run the program.
- Locate the project root directory, whose path ends with
- In UNIX
- Locate the project root directory, whose path ends with
MySTARS
. - Type
javac -cp ./lib/*:./src/main/java -Xlint:none -d ./bin ./src/main/java/mystars/MyStars.java
and press enter to compile the code. - Now, type
java -classpath ./lib/*:./bin mystars.MyStars
and press enter to run the program.
- Locate the project root directory, whose path ends with
If the setup is correct, you should see something like this:
------------------------------------------------------------
_______ _______________________ _______ _______
( )\ /( ____ \__ __( ___ | ____ | ____ \
| () () ( \ / ) ( \/ ) ( | ( ) | ( )| ( \/
| || || |\ (_) /| (_____ | | | (___) | (____)| (_____
| |(_)| | \ / (_____ ) | | | ___ | __|_____ )
| | | | ) ( ) | | | | ( ) | (\ ( ) |
| ) ( | | | /\____) | | | | ) ( | ) \ \_/\____) |
|/ \| \_/ \_______) )_( |/ \|/ \__|_______)
Welcome!
Enter Username:
- To run I/O redirection tests, navigate to the
ui-test
and run thetest(.bat/.sh)
script.
- JUnit tests are included and can be located at
src/test/java/mystars
.
- The database's password is hashed.
- As such, the login username and un-hashed password for both students and admins can be found at
accounts.txt
.
- Please use command line instead of IDE to run the program, or else the password will not be masked.
- Alternatively, run the jar file on the other folder (with an extra
_jar
in the folder name).- This will ensure the password is masked.
- A
start.bat
andstart.sh
file has been included for starting the jar file. - The database for the jar will be separate from the source code i.e. changing one will not affect the other.