> For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daikirai.gitbook.io/scripting/guide/setup.md).

# setup

### Installing the Java Development Kit

{% hint style="warning" %}
You must install the Java Development Kit to create and use scripts!

A Java Runtime Environment (JRE) can run Java applications but does not include the tools required to compile Java scripts. To compile Java scripts you need a **Java Development Kit (JDK)**.
{% endhint %}

**Windows/Linux/macOS (Intel)**: Install the Adoptium Java 8 JDK [here](https://adoptium.net/en-GB/temurin/releases?version=8\&os=any\&arch=any).

**macOS (ARM)**: Install the Azul Zulu ARM64 Java 8 JDK [here](https://www.azul.com/downloads/?version=java-8-lts\&os=macos\&package=jdk#zulu).

***

### Setting the Java executable

{% hint style="info" %}
On Windows, the Java executable is typically located at either:

`C:\Program Files\Java\jdk` <mark style="color:red;">`<java-version>`</mark> `\bin\javaw.exe`

`C:\Program Files\Eclipse Adoptium\jdk` <mark style="color:red;">`<java-version>`</mark> `\bin\javaw.exe`

On Linux:

`/usr/lib/jvm/`<mark style="color:red;">`<java-version>`</mark>`/bin/java`

On macOS:

`/Library/Java/JavaVirtualMachines/`<mark style="color:red;">`<java-version>`</mark>`.jdk/Contents/Home/bin/java`
{% endhint %}

To configure the Java executable in the default Minecraft Launcher, follow these steps:

{% stepper %}
{% step %}

#### Open Installations

Navigate to the "Installations" tab in the launcher interface.
{% endstep %}

{% step %}

#### Select a profile

Locate the launch profile for which you want to set the Java executable.
{% endstep %}

{% step %}

#### Edit the profile

On the right-hand side of the launch profile, click the button faced with three dots and select "Edit" from the drop-down menu.
{% endstep %}

{% step %}

#### Show more options

Click on "More Options" to expand it and reveal additional settings.
{% endstep %}

{% step %}

#### Set Java executable

Locate the field labelled "Java executable" within the "More Options" section and paste the path of `javaw.exe` corresponding to your Java installation into the field.
{% endstep %}
{% endstepper %}

***

### Creating Scripts

* Raven scripts are coded in Java, which means your code must be in a `.java` file.
* The recommended approach is to use a code editor, such as Brackets or Visual Studio Code.
* All scripts must be placed in the `scripts` folder.&#x20;
* Script file names are invalid if they begin with an underscore, exceed 14 characters, conflict with an existing module name, or contain characters other than letters, numbers, underscores, and hyphens.

***

### Using Scripts

* The GUI has a category labelled **Scripts**. All scripts in your scripts folder will be displayed here.
* To add scripts, click **Open Folder** within the Manager module and drag your scripts into the folder.
* Whenever you introduce a new script or make modifications to an existing one, press the **Load Scripts** button to apply the changes.
* If there is an error within a script, it will appear in red and cannot be enabled. An error message will be displayed in the chat window with details about the encountered issue.
