LWJGL
May 22, 2012, 15:06:49 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: How to get LWJGL working with netbeans  (Read 1366 times)
Jim Halpert
Newbie
*
Posts: 2


« on: October 30, 2010, 00:54:46 »

Hello.
I just found out about this library and I would like to know how to get it working with netbeans.
I'm a bit confused from the installation page as it doesn't show how to install it with netbeans.
Logged
jediTofu
Prolific Timewaster
****
Posts: 280



« Reply #1 on: October 30, 2010, 10:21:55 »

Quick Guide:

-Go here: http://lwjgl.org/download.php
-Click LWJGL 2.6
-Download lwjgl-2.6.zip, lwjgl-source-2.6.zip, lwjgl-docs-2.6.zip
-Extract lwjgl-2.6.zip (leave others alone)
-Open NetBeans
-Go to main menu Tools|Libraries
-Click New Library, type in LWJGL2.6 as Library Name, push OK
-Make sure you're selected on LWJGL2.6
-On classpath tab, click Add Jar/Folder, go to where you extracted lwjgl-2.6.zip, go to Jar folder
-Add lwjgl.jar, lwjgl_util.jar, and jinput.jar
-On sources tab, add lwjgl-source-2.6.zip
-On javadoc tab, add lwjgl-docs-2.6.zip
-Create a new Java application
-Right click Libraries node (or go to project properties and go to libraries section)
-Add LWJGL2.6 library
-Go to project properties, go to Run section
-In VM Options, add this (changing the path and OS appropriately):  -Djava.library.path=C:/lwjglpath/native/windows

Now everything is set up.

I'm also currently working on a NetBeans plugin, so expect to see that soon (maybe a week or sooner?).  After I'm done, I'm hoping to write a better NetBeans setup tutorial on the wiki than this lol.  If you have any problems with what I said here, let me know...

P.S. nice name haha
Logged

cool story, bro
jediTofu
Prolific Timewaster
****
Posts: 280



« Reply #2 on: October 30, 2010, 10:27:11 »

Also, when you add a library, it's not like it copies the files.  So store the zip's in a place you want to store them in forever.  Maybe like "C:/LWJGL/LWJGL2.6/" or your desktop or documents or wherever...

Also, if you have spaces in your path, you'll need to put quotes:
-Djava.library.path="C:/this is spacey/native/windows"
Logged

cool story, bro
Jim Halpert
Newbie
*
Posts: 2


« Reply #3 on: October 30, 2010, 11:13:10 »

Ah thanks for the descriptive guide.
Will this plugin be able to work universally? Because I have a project that I put on my USB
and it would be nice to be able to work on it on multiple computers (IE: when I'm at home and at school).

Also can anyone link me to a tutorial for getting started on LWJGL?
I could use some code to ensure it's been installed correctly in netbeans.
Logged
jediTofu
Prolific Timewaster
****
Posts: 280



« Reply #4 on: October 30, 2010, 11:19:21 »

Try copying and pasting the source from FullScreenWindowedTest or similar:
http://lwjgl.org/demos.php


It will be able to work on any NetBeans with the plugin installed, presumably from any location (i.e., your USB drive).
But! I'm hoping to add a feature that copies all the jars/natives to your project if you want to be able to run it without the plugin.  This would also work on other IDE's if they can run Ant scripts; heck, should just work if you have Java and Ant installed.  But this would mean that your project would be a lot bigger (having the jar's and natives inside of it).  That's why it'll be like an added-on feature.
Logged

cool story, bro
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!