---
id: compiling
title: Compiling Plex
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Introduction
Compiling Plex is straightforward as there are no dependencies that need to be added manually. Plex uses Gradle as the build system. All compiling instructions are in the ```build.gradle``` file.

## Prerequisites
Please ensure that you have Java 17 installed on your computer, as Plex requires JDK 17 to compile. You will get an error if you try to use an older version.
If you have Java 17 installed, it may not be set in your path. If you do not already have Java installed, the recommended place to get Java is from [Adoptium](https://adoptium.net/). In the installer, there is an option to set JDK 17 to your path. **You must select that option if it is not already selected by default.**
Plex does not require, but recommends having Git installed on your computer. If you do not want to install Git, you may download the source code manually. Git for Windows can be downloaded [here](https://git-scm.com). macOS and Linux users should already have Git installed by default.

## Using the command line
First, clone the Plex source code from GitHub on to your computer using the following command.
```bash
git clone https://github.com/PlexDevelopment/Plex
```

:::note
If you don't have Git installed, you can download a ZIP of the source code from the repository instead.
:::

Next, change your working directory to the Plex folder.

```bash
cd Plex-master
```

Gradle is already included in the folder with Plex. Run the following command below based on your operating system to compile Plex.
<Tabs>
<TabItem value="macOS" label = "macOS" default>

	./gradlew build

</TabItem>
<TabItem value="Windows" label="Windows">

	gradlew.bat build

</TabItem>
<TabItem value="Linux" label="Linux">

	./gradlew build

</TabItem>
</Tabs>

You should receive a message indicating the compilation was successful. The JAR file is located at ```build/libs/Plex.jar```

Plex has no external dependencies and can be used right away after compilation. Plex works on Minecraft versions 1.16.5 to 1.18.1. You also must be running Java 17 on the server itself.
