Skip to content

faisalazam/MediaRentalSystem

Repository files navigation

A well written, menu-based Java command line (CLI) application for the management of media rentals. It can also be used as a template for any menu-based Java command line (CLI) application. If using it as template, then you'll just have to add the relevant classes/extensions and leave the rest on this framework to take care.

Application's dependencies

Following are the dependencies required for the building and running of the application (categorised by functionality).

Required for the Serialization/De-serialization of JSON data

Required for some static initialization of certain classes using Reflection

Required for the Application's logging

The reflections dependency added above, also requires the following logging dependencies:

Apart from the above mentioned dependencies, you'll need Java 20 installed on your system.

Running the application

In order to run the application, either run the MediaRentalSystem.java class directly from the IDE, or build the jar and then run the jar file as:

java -jar out/artifacts/MediaRentalSystem_jar/MediaRentalSystem.jar.

How to build the jar file from IntelliJ IDEA?

In order to build the jar file from IntelliJ IDEA:

  • Go to the project setting by pressing command + ;

  • Then click on the Artifacts from the left side menu

  • Then click on +

  • Then click on Jar from the opened menu

  • Then click on From the modules with dependencies...

  • And then fill in the opened dialog with required info

  • There'll be two options for jar type

    • extract to the target JAR -> It'll create a fat jar which'll include all the required dependencies
    • copy to the output directory and link via manifest -> It'll create a jar without including dependencies. It'll rather place the dependencies in the same directory as the jar file and set the path in MANIFEST.MF as:

    Class-Path: javassist-3.29.2-GA.jar slf4j-simple-2.0.7.jar jackson-annotations-2.15.2.jar slf4j-api-2.0.7.jar reflections-0.10.2.jar jackson-databind-2.15.2.jar jackson-core-2.15.2.jar

  • Once configured, then the jar file can be built anytime by clicking on the Build -> Build Artifacts -> Build

add-artifacts.png

Application's requirements

Click here for the requirements of MediaRentalSystem

Application's Demo/output

Click here for the application's demo

Processing Media files

Click here for the processing of the Media files

Command Line Interface (CLI) - Menu Processing

Click here for the processing of the Application Menus