LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Help installing LWJGL on windows in netbeans.  (Read 601 times)

BenderBending

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
Help installing LWJGL on windows in netbeans.
« on: November 26, 2016, 20:23:52 »

I searched these fourms, googled it, and watched youtube videos but i still do not understand how to install LWJGL 3.0 on windows in netbeans.
Logged

Kai

  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 900
Re: Help installing LWJGL on windows in netbeans.
« Reply #1 on: November 26, 2016, 21:06:08 »

The easiest solution if you are just starting a new project is:
- Create a new project in NetBeans and in the "New Project" wizard under "Categories:" select "Maven" and under "Projects:" select "Java Application"
- Hit "Next >" in the wizard
- On the next page keep all defaults and hit "Finish"
- The project is created
- Switch from "Projects" view to the "Files" view in the top-left
- Open the pom.xml file
- Go to https://lwjgl.org/download, select "Nightly" and under "Mode" select "Maven"
- below the now visible "Snippets" section to the right click "COPY TO CLIPBOARD"
- Get back to NetBeans with the opened pom.xml file, position your keyboard caret right before the closing </project> tag and paste from clipboard (Ctrl+V)
- Now you'll see that you have two <properties> elements. Merge them to one by removing duplicate entries.
- Now to ensure that NetBeans downloads the Maven dependencies of LWJGL 3, get back into the "Projects" view, right-click on the "Libraries" node/tree-item and select "Download Declared Dependencies". You probably have to wait one or two minutes for NetBeans to download all required Maven dependencies. That is indicated by the progress bar on the bottom right.
- You're done.

Disclaimer: I never worked with NetBeans, but the above quick process worked for me in NetBeans 8.1
Logged

Gojira

  • Newbie
  • *
  • Offline Offline
  • Posts: 20
Re: Help installing LWJGL on windows in netbeans.
« Reply #2 on: March 05, 2017, 21:18:25 »

If you don't want to edit the pom.xml file, you can just download the zip file of LWJGL from GitHub.

Then unpack all the files, and in NetBeans go to Tools -> Libraries.  Create a New Library, call it "LWJGL" or something similar and add all the .jar files you just downloaded.  There's quite a lot so it'll take some time.

Then whenever you need a LWJGL project, just create "New Application" as usual and then click on the "Libraries" in the Projects view (far left screen, not the menu) and just Add Library.  Everything is already set up and you never have to manually modify your build file.  If you're creating lots of little projects (i.e., probably just learning) this is very convenient.
Logged