In this guide, LWJGL-GLFW will be used. There are no plans to add a how-to for jGLFW. LWJGL-GLFW requires the LWJGL core, and sincewill be used in this guide, we will also add LWJGL-STB.
Maven
This assumes, you have already created a Maven project and have some familiarity with Maven's pom.xml file.
Depending on your operating system, add the following to your pom.xml:
This assumes, you have already created an IntelliJ IDEA or Eclipse project and are somewhat familiar with your IDE of choice.
Adjust the following settings:
Options: Include source, Include JavaDoc
Natives: choose depending on your needs
Presets: None (to deselect everything)
Contents: LWJGL core, GLFW, stb
Hit DOWNLOAD ZIP and extract the downloaded archive into a folder in your project root (e.g. lib).
TODO
If you require a more complex dependency setup, for example supporting multiple operating systems, head to and easily build a pom.xml specific to your needs.
If you require a more complex dependency setup, for example supporting multiple operating systems, head to and easily build a gradle.properties specific to your needs.
Open and select Release.
{:start="4"} 4. Open Project Structure by pressing in the top right corner, or CTRL+ALT+SHIFT+S / ⌘Cmd+;. 5. Select the tab Libraries on the left, click on and select Java:
6. Specify your libraries location (selecting the top-level folder is enough), and select the modules to add your libraries to:
Note: When selecting a folder as library file, IntelliJ classifies jars containing JavaDoc and natives under Classes. This is purely visual - JavaDocs and natives are correctly added. 7. Save your Project Settings by clicking Okay.