Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aarokoinsaari/movie-database

A Java application for managing and exploring personal movie collections.
https://github.com/aarokoinsaari/movie-database

dao-design-pattern java java-app javafx javafx-application javafx-desktop-apps sqlite

Last synced: 6 days ago
JSON representation

A Java application for managing and exploring personal movie collections.

Awesome Lists containing this project

README

        

# Movie Database

Lightweight and efficient movie database application developed with Java.

## Introduction

MovieDatabase is a Java application designed to help users manage and explore their movie collections. This is part of coursework at the University of Jyväskylä (JYU).

## Features

- **Manage Movies**: Users can add new movies to the database, edit their information, and remove them when necessary. Each movie entry includes details like title, director, release year, and other key information.

- **Actor Management**: When adding movies, new actors can be added to the database. These actors are then available for selection in future movie entries.

- **Genre Assignment**: Users can assign genres to each movie.

- **Search and Sort Functionality**: The application includes a search feature to find movies by titles. It also allows sorting the movie list based on different criteria, such as name, release year, or director.

## Usage

### Prerequisites

Before you start, ensure you have the following installed:

- Java Development Kit (JDK) 21 or newer.
- Maven (any recent version).
- An IDE that supports JavaFX and Maven (Eclipse, IntelliJ IDEA...)
- `FXGui.jar` package (_see download link below_). This is a JAR library provided by JYU, commonly used in their programming courses.

### Setting Up the Project

1. **Clone the Repository**: Clone the MovieDatabase repository to your local development environment:

2. **IDE configuration**: Open the project in your preferred IDE (make sure the IDE is configured to handle JavaFX dependencies).

3. **Install the FXGUI Library**: Since `FXGui` is not available in public Maven repositories, you need to download the JAR from: https://svn.cc.jyu.fi/srv/svn/ohj2/FXExamples/trunk/FXGui/fxgui.jar.

4. **Install the Library to Your Local Maven Repository**:
Use the following Maven command to install the library to your local Maven repository:

```bash
mvn install:install-file -Dfile=path-to-fxgui.jar -DgroupId=fi.mit.jyu -DartifactId=fxgui -Dversion=1.0 -Dpackaging=jar
```

5. **Verify the Dependency in `pom.xml`**: Ensure that you `pom.xml` file contains the following dependency:

```xml

fi.mit.jyu
fxgui
1.0

```

Make sure the groupId, artifactId, and version match what you used in the Maven install command.

### Building and Running the Application

1. **Build the Project**: Build the project using Maven:

```bash
mvn clean install
```

This will compile the source code, resolve dependencies, and generate the executable JAR.

2. **Run the Application**: Run the application using the generated JAR file:

```
java -jar MovieDatabase.jar
```

Replace `MovieDatabase.jar` with the actual name of the output JAR if it differs.

## Troubleshooting

If you encounter an error (especially when trying to add new actors when the actor column is active) such as `IllegalAccessError`, where the JVM complains about inaccessible packages (e.g., “module javafx.base does not export com.sun.javafx.event to module org.controlsfx.controls”), here is what you need to do:

- In IntelliJ IDEA:

1. Go to **Run > Edit Configurations**
2. Select your Run Configuration.
3. Add the following in the VM Options field:

```bash
--add-opens javafx.base/com.sun.javafx.event=org.controlsfx.controls
```

- Command Line:

```bash
java --add-opens javafx.base/com.sun.javafx.event=org.controlsfx.controls -jar MovieDatabase.jar
```

## Acknowledgements

This project was developed as part of a coursework assignment at the University of Jyväskylä (JYU). I would like to thank the course instructors and teaching assistants for their guidance and feedback throughout the project.

## License

This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.

## Contact

For any inquiries, feel free to contact me via email at [[email protected]](mailto:[email protected]) or connect in LinkedIn: [aarokoinsaari](https://www.linkedin.com/in/AaroKoinsaari).