---
id: compiling
title: Compiling Plex
---

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

# Compiling
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.kts``` file. Note that you can download an already compiled version of Plex from the [CI Server](https://ci.plex.us.org).

## 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/plexusorg/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>

```bash
./gradlew build
```

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

```bash
gradlew.bat build
```

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

```bash
./gradlew build
```

</TabItem>
</Tabs>

You should receive a message indicating the compilation was successful. The JAR files for the Server and Proxy are located in the `build/libs` folder.

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

## Troubleshooting
If you receive an error that says Permission denied, run `chmod a+x gradlew`. Note that this only applies to macOS / Linux users.
