Go to https://www.lwjgl.org/customize Select
- Stable (V3.2.3 or later)
- Mode = "ZIP file"
- Native = "Linux arm64"
- Presets = "Minimal OpenGL"
Download the ZIP file. (assumed to go to ~/Downloads/lwjgl-release-3.2.3-custom.zip)
sudo apt-get install openjdk-8-jdk
# make directory for your code
mkdir lwjgl-test
cd lwjgl-test
# make directory for LWJGL library
mkdir lib
cd lib
# adjust source location as necessary
mv ~/Downloads/lwjgl-release-3.2.3-custom.zip .
unzip lwjgl-release-3.2.3-custom.zip
Save code from https://www.lwjgl.org/guide in file lwjgl-test/HelloWorld.java
Be inside the lwjgl-test
directory when running the following.
javac -cp ".:./lib/lwjgl.jar:./lib/lwjgl-glfw.jar:./lib/lwjgl-opengl.jar" HelloWorld.java
Add natives to java commandline.
java -cp ".:./lib/lwjgl.jar:./lib/lwjgl-natives-linux-arm64.jar:./lib/lwjgl-glfw.jar:./lib/lwjgl-glfw-natives-linux-arm64.jar:./lib/lwjgl-opengl.jar:./lib/lwjgl-opengl-natives-linux-arm64.jar" HelloWorld
Should output: Hello LWJGL 3.2.3 build 13!
and window should pop up with red background.
For a friendlier NVIDIA green, feel free to adjust the clear color like: glClearColor(0.46f, 0.72f, 0.0f, 0.0f);