VOOZH about

URL: https://minecraft.wiki/w/LWJGL

⇱ Tutorial:Update LWJGL (Legacy) – Minecraft Wiki


Tutorial:Update LWJGL (Legacy)

From Minecraft Wiki
(Redirected from LWJGL)
Jump to navigation Jump to search
👁 Image
"LWJGL" redirects here. For LWJGL key codes, see Key codes.
Script warning
 
The Minecraft Wiki is a website that can be edited by anyone. Although edits are usually checked by other wiki editors, it is possible for a malicious user to modify scripts and programs to behave maliciously. It is suggested that you should check the integrity of any script or program you run on your system.
This tutorial is outdated and should no longer be followed.
 
The launcher is capable of automatically updating LWJGL, and a recent version is currently used.

What is LWJGL?

[edit | edit source]

LWJGL is the LightWeight Java Game Library. LWJGL provides Minecraft with access to OpenGL for graphics, OpenAL for sound and GLFW for window and input management. The Minecraft launcher automatically updates to a version of LWJGL that is verified to work with a given version of Minecraft.

Why update?

[edit | edit source]
  • Updating will fix some input bugs where keys seem to get stuck if you click at the same time. It also removes the "ghost" mouse pointer clicking.
  • Some users report a performance increase upon updating.
  • This can also potentially fix some issues regarding sound not working/cutting out.
  • It has been reported to fix intermittent crashes on Windows.
  • It has also been known to resolve the "cannot get JAWT interface" error for Mac users using Java 7.
  • Some Linux distributions, such as openSUSE, require LWJGL to be updated before Minecraft can even run. Trying to run Minecraft without updating LWJGL may create a black screen upon loading. If you cannot play Minecraft on your Linux distribution, chances are that this is the problem.

Where to download

[edit | edit source]

Download LWJGL 2.x from https://legacy.lwjgl.org/download.php.html. Download LWJGL 3.x from https://github.com/LWJGL/lwjgl3/releases (choose the no-javadocs version).

Select the latest stable release and download the lwjgl-X.Y.Z.zip file. You should also backup your .minecraft folder before following the steps below. As a last resort, you can use the Minecraft Launcher's Force Update option to reset the files.

Notes

[edit | edit source]
  • With 2.8.1, on most 64 bit computers, the lwjgl64.dll update will cause a black screen crash. You can revert to the backup version you have saved if needed.
  • Again on several 64 bit computers, the OpenAL64.dll update can cause a sound glitch that makes bursting sounds. Keep a backup in case you need to rollback.
  • Version 2.8.5 generally breaks shift-clicking; 2.8.4 and 2.9.0 do not. You can change the url in your browser to access 2.8.4 or 2.9.0 rather than 2.8.5.
  • LWJGL 2.8.5 has a bug which sends a false signal that the user released all currently pressed keyboard keys when a mouse button is pressed. That means that your building will be significantly slower. Do not update to this version if this bothers you.
    • This bug seems to be fixed when playing in fullscreen mode (Default ), or updating to LWJGL 2.9.0.
  • Do not replace LWJGL 2.x with 3.x or vice versa.

What to replace

[edit | edit source]

LWJGL is a combination of Java and native libraries. As a result there are jars that are universal to all operating systems to replace as well as dynamic library (dll, so, dylib) files specific to each system.

The .minecraft folder's location varies by operating system.

OS Path
Windows %appdata%\.minecraft
Linux ~/.minecraft
macOS ~/Library/Application Support/minecraft

Lwjgl 2.x

[edit | edit source]

In the lwjgl-2.Y.Z.zip file, there should be two folders, named jar and natives. You should replace the files in .minecraft/bin and .minecraft/bin/natives with the versions from the .zip.

All operating systems

[edit | edit source]

You should replace these files in .minecraft/bin/

  • Jinput.jar
  • Lwjgl.jar
  • Lwjgl_util.jar

Natives

[edit | edit source]

With LWJGL 2.x, the native files are located in minecraft/bin/natives/

Windows

[edit | edit source]

Replace the following:

  • jinput-dx8.dll
  • jinput-dx8_64.dll
  • jinput-raw.dll
  • jinput-raw_64.dll
  • lwjgl.dll
  • lwjgl64.dll
  • OpenAL32.dll
  • OpenAL64.dll

You should replace these files:

  • libjinput-osx.jnilib
  • liblwjgl.jnilib
  • openal.dylib
  • libopenal.dylib
    • For this one, create a copy of openal.dylib, then rename it to libopenal.dylib.

GNU/Linux

[edit | edit source]

You should replace these files:

  • libjinput-linux.so
  • libjinput-linux64.so
  • liblwjgl.so
  • liblwjgl64.so
  • libopenal.so
  • libopenal64.so

LWJGL 3.x

[edit | edit source]

For LWJGL 3.x, minecraft stores the jars in folders under .minecraft/libraries/org/lwjgl and the natives in .minecraft/natives-*, with a suffix that reflects your operating system (e.g. natives-windows-x86_64 for Windows x64). The native DLLs do not need to be replaced as they are automatically extracted from the jars.

The lwjgl-3.y.z-no-javadoc.zip file is organized into folders that resemble the structure of .minecraft/libraries/org/lwjgl, with the notable exception that minecraft adds version number information to the path:

  • Minecraft path: .minecraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar
  • Zip path: lwjgl-glfw/lwjgl-glfw.jar

However...

[edit | edit source]

With the new minecraft launcher, the actual source of truth for what libraries to load is found in the version manifest JSON (VERSION.json file in .minecraft/versions/VERSION, replace VERSION with the version you have) like the following:

"libraries":[
{
"name":"org.lwjgl:lwjgl:3.3.3:natives-windows",
"downloads":{
"artifact":{
"path":"org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-windows.jar",
"url":"https://libraries.minecraft.net/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-windows.jar",
"sha1":"a5ed18a2b82fc91b81f40d717cb1f64c9dcb0540",
"size":165442
}
},
"rules":[
{
"action":"allow",
"os":{
"name":"windows"
}
}
]
},

To obtain a newer LWJGL, the correct and simple way is to replace the relevant sections with a corresponding part from a newer Minecraft version that uses a newer LWJGL. For example, Minecraft 1.21.x use LWJGL 3.3.3 while Minecraft 26.1 snapshots use LWJGL 3.4.1.

Alternative installation

[edit | edit source]

On Linux, a user may install the "liblwjgl-java" package and its dependencies via a package manager. On Debian-like systems (Ubuntu, Mint, etc.) a potential root-user command line would be:

apt-get install liblwjgl-java

Resources

[edit | edit source]

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Tutorial:Update_LWJGL_(Legacy)?oldid=3564736"

Navigation menu