Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LWJGL/lwjgl3/llms.txt

Use this file to discover all available pages before exploring further.

LWJGL 3 is distributed as a set of independent modules on Maven Central under the group ID org.lwjgl. The core module (lwjgl) is always required; every other binding is optional. Modules that include native code ship a separate natives JAR for each supported platform — you must add the natives artifact matching your target OS at runtime.
The LWJGL build configurator at lwjgl.org lets you select bindings and platforms interactively and then copies ready-to-paste Maven or Gradle declarations directly to your clipboard.

Bill of Materials (BOM)

LWJGL publishes a Maven BOM (lwjgl-bom) that pins all module versions together. Using the BOM means you only declare the version once and do not have to repeat it on every dependency.

Adding core and common bindings

The example below adds the core module, GLFW, and OpenGL with natives for Linux (x64), macOS (x64 and Apple Silicon), and Windows (x64). Adjust the natives list to match the platforms you intend to ship.
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.lwjgl</groupId>
      <artifactId>lwjgl-bom</artifactId>
      <version>3.4.2</version>
      <scope>import</scope>
      <type>pom</type>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <!-- Core module (always required) -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
  </dependency>

  <!-- GLFW binding -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-glfw</artifactId>
  </dependency>

  <!-- OpenGL binding -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opengl</artifactId>
  </dependency>

  <!-- Natives: Linux x64 -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <classifier>natives-linux</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-glfw</artifactId>
    <classifier>natives-linux</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opengl</artifactId>
    <classifier>natives-linux</classifier>
    <scope>runtime</scope>
  </dependency>

  <!-- Natives: macOS x64 -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <classifier>natives-macos</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-glfw</artifactId>
    <classifier>natives-macos</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opengl</artifactId>
    <classifier>natives-macos</classifier>
    <scope>runtime</scope>
  </dependency>

  <!-- Natives: macOS arm64 (Apple Silicon) -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <classifier>natives-macos-arm64</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-glfw</artifactId>
    <classifier>natives-macos-arm64</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opengl</artifactId>
    <classifier>natives-macos-arm64</classifier>
    <scope>runtime</scope>
  </dependency>

  <!-- Natives: Windows x64 -->
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <classifier>natives-windows</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-glfw</artifactId>
    <classifier>natives-windows</classifier>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opengl</artifactId>
    <classifier>natives-windows</classifier>
    <scope>runtime</scope>
  </dependency>
</dependencies>

Native classifier reference

Each natives JAR contains the compiled shared libraries for one platform and architecture. The classifier names follow a consistent pattern:
ClassifierPlatform
natives-linuxLinux x64
natives-linux-arm64Linux arm64 (ARMv8/AArch64)
natives-linux-arm32Linux arm32 (ARMv7/armhf)
natives-macosmacOS x64
natives-macos-arm64macOS arm64 (Apple Silicon)
natives-windowsWindows x64
natives-windows-x86Windows x86 (32-bit)
natives-windows-arm64Windows arm64
Not all modules ship natives for every platform — for example, some bindings are only available on a subset of operating systems. The build configurator shows which classifiers are available for each module.

How native loading works

When your application starts, LWJGL inspects the natives JARs on the classpath, extracts the shared libraries to a temporary directory, and loads them automatically. No java.library.path configuration is required in the default case. If you need manual control — for example when building a platform-specific installer — you can extract the natives yourself and set java.library.path to point to the directory containing the unpacked shared libraries. The org.lwjgl.system.Configuration class also exposes programmatic options for customizing native extraction and loading.

Module dependencies

Some binding modules require other binding modules to be present. The dependencies to be aware of are:
ModuleRequires
lwjgl-opengllwjgl (core)
lwjgl-opengleslwjgl (core)
lwjgl-glfwlwjgl (core)
lwjgl-vulkanlwjgl (core)
lwjgl-opencllwjgl (core)
lwjgl-egllwjgl (core)
All bindings depend on the core module. Build tools resolve transitive dependencies automatically, so you only need to declare direct dependencies explicitly.

Unsafe classifier

For use cases that require JNI or direct Unsafe memory access — instead of the default FFM (Foreign Function & Memory) backend available from JDK 25 — add the unsafe classifier to the core module:
Maven
<dependency>
  <groupId>org.lwjgl</groupId>
  <artifactId>lwjgl</artifactId>
  <version>3.4.2</version>
  <classifier>unsafe</classifier>
</dependency>
Gradle Kotlin DSL
implementation("org.lwjgl:lwjgl:3.4.2:unsafe")
The unsafe classifier is intended for advanced use cases. Most applications should use the default JAR, which selects the appropriate backend automatically based on the running JDK version.

Next steps

Quickstart

Open a window with GLFW and render your first frame with OpenGL.

Introduction

Learn what LWJGL provides, which bindings are available, and which platforms are supported.

Build docs developers (and LLMs) love