Skip to content

Installation

m0rkeulv edited this page Oct 25, 2026 · 5 revisions

This page takes you from a fresh IntelliJ IDEA to a working Haxe setup: installing the plugin, installing Haxe and haxelib on Windows, macOS or Linux, and registering Haxe as an SDK in the IDE. It ends with the extra runtimes some targets need.

Before you start

  • IntelliJ IDEA 2026.2 or 2026.3. The profilers and the project diagram need an IntelliJ IDEA Ultimate subscription. So does Flash/AIR debugging: it relies on JetBrains' Flash/Flex plugin, which works only with IntelliJ IDEA Ultimate. Everything else works without a subscription.
  • Haxe 4 or later, or Haxe 3.4.7. Most features work with any Haxe 4 release; Haxe 3.4.7 gets fewer of them. The debuggers need Haxe 4.1 or later, and compiler diagnostics need Haxe 4.3.5 or later, or Haxe 3.4.7. See Supported Versions.

Install the plugin

The plugin is called Haxe Toolkit Support. You can install it from the JetBrains Marketplace or from a zip file on the GitHub releases page.

Note

This wiki documents version 2.0 and newer.

From the JetBrains Marketplace

  1. Open Settings: File | Settings on Windows and Linux, IntelliJ IDEA | Settings on macOS.
  2. Select Plugins and open the Marketplace tab.
  3. Search for Haxe and click Install next to Haxe Toolkit Support.
  4. Restart the IDE if it asks you to.

The Plugins settings page with Haxe Toolkit Support installed

The installed plugin on the Installed tab

The plugin's Marketplace page is https://plugins.jetbrains.com/plugin/6873.

From a GitHub release

  1. Open the GitHub releases page and pick a release. Test builds published ahead of a release are marked Pre-release.

  2. Under Assets, download the plugin zip:

    Release kind File name
    Release intellij-haxe-<IDE version>.zip, for example intellij-haxe-2026.2.zip
    Pre-release intellij-haxe-<IDE version>-beta.zip, for example intellij-haxe-2026.2-beta.zip

    The number in the file name is the IntelliJ IDEA version the build was made with. If a release lists more than one zip, pick the one that matches your IDE version. Do not unpack the zip.

  3. Open Settings and select Plugins.

  4. Click the gear icon next to the tabs and choose Install Plugin from Disk.

  5. Select the downloaded zip file and click OK.

  6. Restart the IDE if it asks you to.

JetBrains describes both procedures in Install plugins.

Install Haxe

Download Haxe from the official Haxe download page. It always shows the latest stable release; older versions and previews are in the version list.

Platform What haxe.org offers
Windows Installer (.exe) or binaries (.zip), each as a 64-bit and a 32-bit build
macOS Installer (.pkg) or binaries (.tar.gz)
Linux Packages for Ubuntu, Debian, Fedora, openSUSE and Arch Linux, or binaries (.tar.gz) for 64-bit and arm64

Haxe releases include haxelib, the Haxe library manager.

Windows

Run the installer, or unpack the binaries archive to a folder of your choice. Then open a new terminal and check that Haxe is found:

haxe -version
where.exe haxe

The second command prints where haxe.exe is. You need that folder when you register the SDK in the IDE. If you unpacked the binaries archive and haxe is not found, add the folder that contains haxe.exe to your PATH.

macOS

Run the .pkg installer, or unpack the binaries archive to a folder of your choice. Then open a new terminal:

haxe -version
which haxe

If you unpacked the binaries archive and haxe is not found, add the folder that contains haxe to your PATH.

Linux

You can install Haxe from your distribution's packages or from the binaries archive. The Linux download page lists the package source for each distribution. In every case listed there, the package is called haxe and installs Neko as a dependency:

Distribution Command
Ubuntu and Ubuntu-based (PPA) sudo add-apt-repository ppa:haxe/releases -y, sudo apt-get update, then sudo apt-get install haxe -y
Debian sudo apt-get install haxe -y
Fedora sudo dnf install haxe -y
openSUSE sudo zypper install haxe
Arch Linux sudo pacman -S haxe

Tip

Distribution packages can lag behind the latest Haxe release. The Linux download page says which sources stay current, for example the Ubuntu PPA, and how to get newer packages for Debian and openSUSE.

Check the installation in a terminal:

haxe -version
which haxe

With the Ubuntu package, the compiler is /usr/bin/haxe and the standard library is in /usr/share/haxe/std (see the package file list). Other packages and the binaries archive can use other folders; which haxe tells you where yours is.

Set up haxelib

The plugin uses haxelib to find the libraries your build files use, and to install missing ones. haxelib needs a folder to keep libraries in, the repository. Set it up once, in a terminal, before you open a project in the IDE.

  1. Check whether haxelib already has a repository:

    haxelib config

    This prints the current repository folder. On Windows, haxelib uses the lib folder of the Haxe installation by default: C:\HaxeToolkit\haxe\lib when you installed Haxe with the installer into its default folder.

  2. If no repository is set, or you want a different one, run haxelib setup with a folder you can write to. The Linux download page suggests a folder in your home directory:

    mkdir ~/haxelib && haxelib setup ~/haxelib

    On Windows, create a folder first and pass its path, for example haxelib setup C:\haxelib. Without a folder argument, haxelib setup asks for one.

See Using Haxelib for every haxelib command.

Neko

The haxelib client runs on the Neko virtual machine. The Windows and macOS installers include Neko, and the Linux distribution packages install it as a dependency. The binaries archives (.zip and .tar.gz) do not include Neko: if you installed Haxe from one, or if haxelib does not start, install Neko from nekovm.org. You also need Neko to run programs built for the Neko target.

Project-local repositories

A project can keep its own libraries in a .haxelib folder in the project root, created with haxelib newrepo. haxelib commands that run in the project folder then use this local repository instead of the global one. The Haxe Template entry of the new-project wizard can create this folder for you (Haxelib repository: Local (.haxelib)). See Libraries and Haxelib.

Register the Haxe SDK in the IDE

IntelliJ IDEA knows your Haxe installation as an SDK of the type Haxe toolkit. You register it once per machine, and every project can use it. You can register several, for example two Haxe versions.

Which folder to select

Select the folder that contains the haxe executable (haxe.exe on Windows). On Windows and macOS, a folder whose bin subfolder contains the executable works too.

When you select a folder, the plugin:

  • runs the compiler to check it and to read its version. The SDK is named after the version, for example Haxe 4.3.7.
  • adds the standard library from the folders the compiler itself searches. When the HAXE_STD_PATH environment variable is set, these are the folders it lists (separated like PATH) that exist, and nothing else. Otherwise it is the std folder next to the compiler. On Linux and macOS, lib/haxe/std and share/haxe/std in the parent of the compiler's folder come first, so for the Ubuntu package you can select /usr/bin.
  • picks up haxelib from the same place as the compiler. Neko comes from the folder the NEKO_INSTPATH environment variable names, then from the folders NEKOPATH lists, then from your PATH.

The plugin suggests a folder by itself when the HAXEPATH or HAXE_STD_PATH environment variable is set, or when haxe is on your PATH. When HAXE_STD_PATH lists several folders, the suggestion comes from the first.

Tip

When a module's SDK contains no Haxe standard library, a banner at the top of the editor says so. What it says depends on whether the HAXE_STD_PATH environment variable is set:

  • Without HAXE_STD_PATH, it reads Haxe SDK has no valid root. Set up or change SDK. First check that the module uses a Haxe SDK (see Choose the SDK a project uses). If it does, remove the SDK and add it again, selecting the folder that contains the compiler. If your installation keeps the standard library somewhere else, set HAXE_STD_PATH to that folder, restart the IDE and add the SDK again.
  • With HAXE_STD_PATH set, it reads Haxe SDK has no valid root: no folder in HAXE_STD_PATH (...) contains the standard library, with the variable's value in the brackets. The plugin then looks for the standard library only in those folders, as the compiler does. Correct the variable or remove it, restart the IDE and add the SDK again.

Add the SDK

Use any of these:

  • Project Structure: open File | Project Structure | Platform Settings | SDKs, click +, choose the Haxe toolkit entry and select the Haxe folder.
  • The editor banner: when you open a Haxe file in a module that has no Haxe SDK, the editor shows No Haxe SDK is configured for this module - pick one here or in the Haxe tool window under Environment. Click Setup SDK and pick an SDK, or add a new one from disk. The choice applies to that file's module.
  • The new-project wizard: both Haxe entries of the New Project dialog have a Haxe SDK: field. If no Haxe SDK is registered when you create a project and the plugin can suggest a folder (see above), it registers one named Haxe toolkit. The SDK you choose, or the one the plugin registers, becomes the project default under Build Tools | Haxe. See Your First Project.

The SDKs page in Project Structure with a Haxe SDK's home path, haxelib and Neko, HashLink and AIR SDK runtimes

The SDKs page with two Haxe SDKs and an AIR SDK registered (1), the selected SDK's Haxe folder and haxelib (2) and its runtimes (3); see Tool and runtime paths

Choose the SDK a project uses

Registering an SDK makes it available. You then choose which SDK a project and its modules use:

Scope Where
Project default Settings | Build, Execution, Deployment | Build Tools | Haxe, field Haxe SDK:
One module Haxe tool window: the module's IDE environment node, row SDK. Click its value and choose an SDK, or Project default to follow the project setting.

These lists only show SDKs that are already registered. Choose the SDK in these places rather than in Project Structure | Modules: the plugin's builds follow these settings, and the plugin applies them to the modules again each time the project opens.

When you pick an SDK in the banner, the tool window or Build Tools | Haxe, the plugin resolves the project's libraries again, because their locations come from that SDK's haxelib.

See Core Concepts for how project defaults and module settings fit together.

Tool and runtime paths

The plugin finds haxelib and the target runtimes on its own in most setups. Set a path only when it picks the wrong one or none.

  • On the SDK: the Haxe SDK's page in Project Structure | Platform Settings | SDKs has Haxelib executable: and, under Runtimes, Neko executable:, HashLink executable:, NodeJS executable:, Flash player executable: and Flex/AIR SDK:. These apply to every project that uses the SDK. An empty haxelib, Neko, HashLink or NodeJS field shows in gray what the plugin detects on its own.
  • For one project: Settings | Build, Execution, Deployment | Build Tools | Haxe has Haxelib executable: and a Runtime Overrides section with the same runtime fields. Leave a field empty to use the SDK's value.

For Neko, HashLink and Node.js the plugin uses the project override first, then the SDK's setting, then your PATH. HashLink also checks a few environment variables before the PATH; see Debugging HashLink. A Flash player is never looked up on the PATH; set it on the SDK or in the project.

A path field warns below itself when its path does not exist or the folder lacks the executable, for example Not found: .... The warning does not stop you from applying the setting.

See Settings Reference for every field.

Optional: runtimes for your targets

Haxe runs code in its interpreter without anything else. To build some targets, or to run or debug their output, you need that target's runtime or toolchain:

Target What you need Get it from Details
HashLink The HashLink runtime (hl). Set its path on the Haxe SDK (HashLink executable:) or put hl on your PATH. hashlink.haxe.org Debugging HashLink
C++ (hxcpp) The hxcpp haxelib and a C++ compiler: Visual Studio on Windows, Xcode on macOS and your distribution's compiler packages on Linux Getting started with Haxe/C++ Debugging HXCPP
JavaScript To debug in a browser: Firefox or a Chromium-family browser, and Node.js, which runs the debug adapter. Node.js also runs Node.js programs and JavaScript unit tests. nodejs.org Debugging JavaScript
Neko The Neko runtime nekovm.org Run Configurations
Flash and AIR The AIR SDK. Debugging needs it registered as a Flex/AIR SDK in Project Structure | SDKs, which needs the Flash/Flex plugin (IntelliJ IDEA Ultimate only). To run AIR applications and Flash tests, the plugin also finds it through the AIR_SDK environment variable. A standalone Flash Player for plain .swf files. Adobe AIR SDK from HARMAN Debugging Flash and AIR
Interpreter Nothing beyond Haxe Debugging with the Interpreter

Next steps

Create or open a project: Your First Project.

Clone this wiki locally