Difference between revisions of "Setting up Slick2D with NetBeansIDE"

From Slick2D Wiki
Jump to: navigation, search
(Added Setting up Slick2d with Netbeans)
 
(Cleaned up a bit)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
This tutorial will run you through the steps you'll need to set Slick2d with the [http://www.netbeans.org/ NetBeans].
+
This tutorial will run you through the steps you'll need to set Slick2D up with [http://www.netbeans.org/ NetBeans].
  
Since Slick2d uses [http://www.lwjgl.org/ LWJGL], setup is split into 2 parts, the Jar files, and the LWJGL natives (*.dll files for Windows, *.so files for linux and *.dylib/*.jnilib for Mac).
+
Since Slick2d uses [http://www.lwjgl.org/ LWJGL], setup is split into 2 parts, the JAR files, and the LWJGL natives (*.dll files for Windows, *.so files for Unix and Linux and *.dylib/*.jnilib for Mac).
  
  
==Downloading and Extracting Slick2d and LWJGL==
+
==Downloading and Extracting Slick2D and LWJGL==
  
* Download [http://www.slick2d.org/downloads/slick.jar Slick2d]
+
* Download [http://www.slick2d.org/downloads/slick.jar Slick2D]
 
* Download [http://www.lwjgl.org/download.php LWJGL] standard bundle  
 
* Download [http://www.lwjgl.org/download.php LWJGL] standard bundle  
  
* Extract the LWJGL zip (lwjgl-x.x.zip) file somewhere in your computer, remember or noted it down, you will need this later. We suggest you create a library (/lib) folder to store all these files in a well-known place.  
+
* Extract the LWJGL zip (lwjgl-x.x.zip) file somewhere in your computer, remember or note down the location, you will need this later. We suggest you create a library (/lib) folder to store all these files in a well-known place.  
  
  
==Setting Up Slick2d and LWJGL in NetBeans==
+
==Setting Up Slick2D and LWJGL in NetBeans==
  
 
Extracted from [http://lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_NetBeans LWJGL with Netbeans]
 
Extracted from [http://lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_NetBeans LWJGL with Netbeans]
Line 21: Line 21:
 
# Go to Tools|Libraries in the main menu.
 
# Go to Tools|Libraries in the main menu.
 
# Click on the New Library button.
 
# Click on the New Library button.
# Type in Slick2d or any other name that you want for the Library Name.
+
# Type in Slick2D or any other name that you want for the Library Name.
 
# Select Classpath tab for your newly created Library and then click the Add JAR/Folder... button.
 
# Select Classpath tab for your newly created Library and then click the Add JAR/Folder... button.
 
# Go to where you extracted lwjgl-X.X.zip and add the following '.jar'('Ctrl' or 'Alt' to select multiple files)
 
# Go to where you extracted lwjgl-X.X.zip and add the following '.jar'('Ctrl' or 'Alt' to select multiple files)
Line 30: Line 30:
  
  
==Setting Up a Project to Use LWJGL in NetBeans==
+
==Setting Up a Project to use LWJGL in NetBeans==
  
 
* In a new Java project:  
 
* In a new Java project:  
  
 
# Right-Click your project node or go to File>Project Properties and select Libraries
 
# Right-Click your project node or go to File>Project Properties and select Libraries
# Add your Slick2d Library , created as instructed above
+
# Add your Slick2D Library , created as instructed above
 
# Select Run
 
# Select Run
 
# On VM Options put the following:  
 
# On VM Options put the following:  
Line 41: Line 41:
 
     -Djava.library.path=<lwjgl-X.X path>/native/<linux|macosx|solaris|windows>  
 
     -Djava.library.path=<lwjgl-X.X path>/native/<linux|macosx|solaris|windows>  
  
(*)Note: Remember to select the natives of your Operation System.
+
(*)Note: Remember to select the natives of your operating system.

Revision as of 05:06, 11 July 2013

Introduction

This tutorial will run you through the steps you'll need to set Slick2D up with NetBeans.

Since Slick2d uses LWJGL, setup is split into 2 parts, the JAR files, and the LWJGL natives (*.dll files for Windows, *.so files for Unix and Linux and *.dylib/*.jnilib for Mac).


Downloading and Extracting Slick2D and LWJGL

  • Extract the LWJGL zip (lwjgl-x.x.zip) file somewhere in your computer, remember or note down the location, you will need this later. We suggest you create a library (/lib) folder to store all these files in a well-known place.


Setting Up Slick2D and LWJGL in NetBeans

Extracted from LWJGL with Netbeans

  1. Open up NetBeans.
  2. Go to Tools|Libraries in the main menu.
  3. Click on the New Library button.
  4. Type in Slick2D or any other name that you want for the Library Name.
  5. Select Classpath tab for your newly created Library and then click the Add JAR/Folder... button.
  6. Go to where you extracted lwjgl-X.X.zip and add the following '.jar'('Ctrl' or 'Alt' to select multiple files)
    1. lwjgl.jar
    2. Slick.jar
    3. jinput.jar
    4. lwjgl_util.jar (if want to use OpenGL's GLU class)


Setting Up a Project to use LWJGL in NetBeans

  • In a new Java project:
  1. Right-Click your project node or go to File>Project Properties and select Libraries
  2. Add your Slick2D Library , created as instructed above
  3. Select Run
  4. On VM Options put the following:
   -Djava.library.path=<lwjgl-X.X path>/native/<linux|macosx|solaris|windows> 

(*)Note: Remember to select the natives of your operating system.