LWJGL (Lightweight Java Game Library) 3 is an open source Java library that enables cross-platform access to popular native APIs used in graphics (OpenGL, Vulkan), audio (OpenAL), and parallel computing (OpenCL) applications. Its access is direct and high-performance, yet wrapped in a type-safe, Java-friendly layer. LWJGL is freely available under the BSD 3-Clause license and distributed via Maven Central.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 is an enabling technology that provides low-level access. It is not a framework and does not add higher-level abstractions beyond what the underlying native libraries expose. If you are new to graphics programming, consider starting with a framework or game engine built on top of LWJGL before working with it directly.
Key features
Direct native access
Calls map 1-to-1 to native library functions. There is no abstraction layer between your Java code and the GPU driver.
Type-safe Java API
All bindings are generated from native headers and use Java types, enums, and structs instead of raw pointers and integer constants.
Modular distribution
Only the core module is required. Add only the binding modules you actually use — keeping your dependency footprint small.
Automatic native loading
LWJGL extracts platform-specific native libraries from the JAR at runtime. No
java.library.path configuration is required in the common case.Off-heap memory utilities
MemoryUtil and MemoryStack provide safe, explicit control over off-heap memory, which is required when passing data buffers to native APIs.FFM API support
From version 3.4.0 and JDK 25, LWJGL supports the Foreign Function & Memory API and is fully functional with
--sun-misc-unsafe-memory-access=deny.Supported bindings
Khronos APIs
| Library | Description |
|---|---|
| EGL | Interface between Khronos rendering APIs and the native platform window system. |
| KTX (Khronos Texture) | Lightweight container for textures for OpenGL, Vulkan, and other GPU APIs. |
| OpenCL | Open standard for cross-platform parallel programming across CPUs, GPUs, and embedded processors. |
| OpenGL | The most widely adopted 2D and 3D graphics API in the industry. |
| OpenGL ES | Cross-platform 2D and 3D graphics API for embedded and mobile systems. |
| OpenXR | High-performance access to Augmented Reality and Virtual Reality platforms and devices. |
| Vulkan | Low-overhead, explicit GPU API for modern, high-efficiency graphics and compute. |
Display and input
| Library | Description |
|---|---|
| GLFW | Create windows, handle keyboard/mouse/gamepad input, and manage OpenGL or Vulkan contexts. |
| SDL | Cross-platform access to audio, keyboard, mouse, joystick, and GPU hardware. |
| JAWT | The AWT native interface. |
| Native File Dialog Extended | Portable C library for native file open, folder select, and save dialogs. |
| tinyfd | Lightweight native dialog library. |
Audio
| Library | Description |
|---|---|
| FMOD | End-to-end solution for game audio and music. |
| OpenAL | Cross-platform 3D audio API for gaming applications. |
| OpenAL Soft | LGPL-licensed, cross-platform software implementation of OpenAL. |
| Opus | Open, royalty-free, highly versatile audio codec. |
Graphics utilities
Assimp, bgfx, FreeType, HarfBuzz, meshoptimizer, msdfgen, NanoSVG, NanoVG, Nuklear, par_shapes, par_streamlines, Shaderc, SPIRV-Cross, Vulkan Memory Allocator, Yoga, and the full stb single-file library collection (image loading, font rasterization, Perlin noise, and more).Other utilities
hwloc, jemalloc, libffi, libspng, LLVM, LMDB, LZ4, ODBC, Remotery, RenderDoc, rpmalloc, xxHash, and Zstandard.Supported platforms
LWJGL 3 requires Java 8 or later and supports the following operating systems and CPU architectures:| Operating system | Architectures |
|---|---|
| FreeBSD | x64 |
| Linux | x64, arm64 (ARMv8/AArch64), arm32 (ARMv7/armhf), ppc64le, riscv64 |
| macOS | x64, arm64 (Apple Silicon) |
| Windows | x64, x86, arm64 |
License
LWJGL is released under the BSD 3-Clause License. Individual bindings may be subject to the terms of the corresponding third-party library license; see the third-party license directory for details.Next steps
Quickstart
Create a window and draw your first frame with GLFW and OpenGL.
Installation
Add LWJGL to your Maven or Gradle project with the right native classifiers.