Setting up and getting started
Setting up the program in your computer
- Ensure that you have Java JDK 11 installed on your OS.
- Download the JAR file of the program here
- Save the file into a folder name CAP5.0Buddy in any directory.
- Run the JAR file
a. Double click on the JAR file to execute.
b. Open up Command Prompt in OS, navigate to directory of the JAR file and return
java -jar *JARfile_name*.jar
- Refer to our User Guide to start using the program.
Error fixing
If you face any issues starting to launch the JAR file, pls refer to the FAQ below.
- Unable to run the file due to missing java in OS.
##example> java -jar cap5.jar
'java' is not recognized as an internal or external command,
operable program or batch file.
Solution: Install java JDK on your OS, which can be found here
- Unable to run JAR file due to the JAR being compiled in a higher version.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: mattbot/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
Solution: Make sure that you have Java JDK 11 installed on your computer. If not, you can uninstall your current java and reinstall from the above link, or here. ======= First, fork this repo, and clone the fork into your computer.
If you plan to use Intellij IDEA (highly recommended):
- Configure the JDK: Follow the guide [se-edu/guides] IDEA: Configuring the JDK to to ensure Intellij is configured to use JDK 11.
-
Import the project as a Gradle project: Follow the guide [se-edu/guides] IDEA: Importing a Gradle project to import the project into IDEA.
Note: Importing a Gradle project is slightly different from importing a normal Java project. -
Verify the setup:
- Run the
seedu.address.Main
and try a few commands. - Run the tests to ensure they all pass.
- Run the
Before writing code
-
Configure the coding style
If using IDEA, follow the guide [se-edu/guides] IDEA: Configuring the code style to set up IDEA’s coding style to match ours.
Tip: Optionally, you can follow the guide [se-edu/guides] Using Checkstyle to find how to use the CheckStyle within IDEA e.g., to report problems as you write code. -
Set up CI
This project comes with a GitHub Actions config files (in
.github/workflows
folder). When GitHub detects those files, it will run the CI for your project automatically at each push to themaster
branch or to any PR. No set up required. -
Learn the design
When you are ready to start coding, we recommend that you get some sense of the overall design by reading about AddressBook’s architecture.
-
Do the tutorials These tutorials will help you get acquainted with the codebase.