Code Search for Developers
 
 
  

installation.php from Lightweight Java Game Library at Krugle


Show installation.php syntax highlighted

<? require('_include/header.php'); ?>

<h1><a name="top">Installation</a></h1>
<p>
	As LWJGL is more or less self contained, the actual installation typically amounts to extracting the archive, and asserting that everything works fine by running an example. The following paragraphs will walk you through the installation on the supported platforms: <a href="#windows">Windows</a>, <a href="#linux">Linux</a> and <a href="#macosx">Mac OS X</a>.<br/><br/>

	Below the installations instructions you will find help on how to integrate LWJGL into <a href="#eclipse">Eclipse</a>, <a href="#netbeans">Netbeans</a> and <a href="#jcreator">JCreator</a>.<br/><br/>

	<b><a name="windows">Windows</a></b> <span class="newsdate"><a href="#top">Back to top</a></span>
</p>
<ul>
	<li><a href="download.php">Download</a> the distribution</li>
	<li>
		Unpack the archive, file contents (in sub folders) should include (amongst other things):<br/><br/>
		<pre>lwjgl.dll
lwjglaudio.dll
lwjgl.jar
lwjgl_util.jar
lwjgl_test.jar</pre>
	</li>
	<li>
		Test LWJGL by opening a command prompt, and navigating to the folder where the archive was extracted. Once navigated, issue the following command:<br/><br/>
		<pre>java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar;jar\jinput.jar; 
    -Djava.library.path=native\win32 org.lwjgl.test.WindowCreationTest</pre>
		A window should appear and you should see the following output:<br/><br/>
		<pre>Found &lt;number&gt; display modes
240, 320, WindowCreationTest
Display created
Moving to 100, 100
Window created
600, 800, Game</pre>
	</li>
</ul>

<p>
	<b><a name="linux">Linux</a></b> <span class="newsdate"><a href="#top">Back to top</a></span>
</p>
<ul>
	<li><a href="download.php">Download</a> the distribution</li>
	<li>
		Unpack the archive, file contents (in sub folders) should include (amongst other things):<br/><br/>
		<pre>liblwjgl.so
libopenal.so
lwjgl.jar
lwjgl_util.jar
lwjgl_test.jar</pre>
	</li>
	<li>
		Test LWJGL by opening a command prompt, and navigating to the folder where the archive was extracted. Once navigated, issue the following command:<br/><br/>
		<pre>java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: 
    -Djava.library.path=native/linux org.lwjgl.test.WindowCreationTest</pre>
		Should library loading fail, try using -Djava.library.path to specify the path. For example:<br/><br/>
		<pre>java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: 
    -Djava.library.path=/home/lwjgluser/lwjgl/ org.lwjgl.test.WindowCreationTest</pre>
		A window should appear and you should see the following output:<br/><br/>
		<pre>Found &lt;number&gt; display modes
240, 320, WindowCreationTest
Display created
Moving to 100, 100
Window created
600, 800, Game</pre>
	</li>
</ul>

<p>
	<b><a name="macosx">Mac OS X</a></b> <span class="newsdate"><a href="#top">Back to top</a></span>
</p>
<ul>
	<li><a href="download.php">Download</a> the distribution</li>
	<li>
		Unpack the archive, file contents (in sub folders) should include (amongst other things):<br/><br/>
		<pre>liblwjgl.jnilib
libopenal.dylib
lwjgl.jar
lwjgl_util.jar
lwjgl_test.jar</pre>
	</li>
	<li>
		Test LWJGL by opening a command prompt, and navigating to the folder where the archive was extracted. Once navigated, issue the following command:<br/><br/>
		<pre>java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: 
    -Djava.library.path=native/macosx org.lwjgl.test.WindowCreationTest</pre>
		A window should appear and you should see the following output:<br/><br/>
		<pre>Found &lt;number&gt; display modes
240, 320, WindowCreationTest
Display created
Moving to 100, 100
Window created
600, 800, Game</pre>
	</li>
</ul>

<h1><a name="ide">Installation</a></h1>
<p>
	Using LWJGL in your IDE is as as simple as including the jar and telling where the native files are to be located. The following lists how to install LWJGL in some popular IDEs: <a href="#eclipse">Eclipse</a>, <a href="#netbeans">Netbeans</a>, <a href="#jcreator">JCreator</a>.<br/><br/>
	
	<b><a name="eclipse">Eclipse</a></b> <span class="newsdate"><a href="#top">Back to top</a></span>
</p>
<ul>
	<li>Having installed LWJGL on your platform of choice, fire up Eclipse.</li>
	<li>
		Create a new project, and add lwjgl.jar to the build path of your project (Project->Properties->Java build path) by clicking 'Add External JARs' under the Libraries tab<br/><br/>
		<img src="_gfx/installation/eclipse-1.png" alt="LWJGL Installation under Eclipse"/><br/><br/>
	</li>
	<li>
		Having created a class to run, create a new run target by selecting the 'Run' icon or using the menu (Run -> Run...)<br/><br/>
		<img src="_gfx/installation/eclipse-2.png" alt="LWJGL Installation under Eclipse"/><br/><br/>
		Select 'New' from the dialog box<br/><br/>
		<img src="_gfx/installation/eclipse-3.png" alt="LWJGL Installation under Eclipse"/><br/><br/>
		Supply a name for your new target, and make SURE you add the path to the dll files supplying the -Djava.library.path argument to the vm. The path you supply is relative to the working directory. Adjust this too if needed.<br/><br/>
		<img src="_gfx/installation/eclipse-4.png" alt="LWJGL Installation under Eclipse"/><br/><br/>
	</li>
	<li>You should now be able to run the application directly from Eclipse. Run the newly created target to confirm.</li>
</ul>

<p>
	<b><a name="netbeans">Netbeans</a></b> <span class="newsdate"><a href="#top">Back to top</a></span>
</p>
<ul>
	<li>Having installed LWJGL on your platform of choice, fire up Netbeans.</li>
	<li>
		Create a new project, and mount lwjgl.jar in the project filesystem by right clicking the Filesystem and selecting Mount -> Archive Files<br/><br/>
		<img src="_gfx/installation/netbeans-1.png" alt="LWJGL Installation under Netbeans"/><br/><br/>
	</li>
	<li>
		Having created a class to run, you need to setup that class to execute using an External Execution<br/><br/>
		<img src="_gfx/installation/netbeans-2.png" alt="LWJGL Installation under Netbeans"/><br/><br/>
		Since Netbeans doesn't allow to change the library path you either have to change the working directory of the executor to the lwjgl.dll or copy files over to whereever you run from. More info is provided in the <a href="http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_34" target="_blank">Netbeans FAQ</a>.<br/><br/>
		<img src="_gfx/installation/netbeans-3.png" alt="LWJGL Installation under Netbeans"/><br/><br/>
	</li>
	<li>You should now be able to run the application directly from Netbeans. Push F6 to verify.</li>
</ul>

<p>
	<b><a name="jcreator">JCreator</a></b> <span class="newsdate"><a href="#top">Back to top</a></span>
</p>
<ul>
	<li>
		Create project. Goto Project->Project Properties, select 'Required Libraries' tab and click New.<br/><br/>
		<img src="_gfx/installation/jcreator-1.jpg" alt="LWJGL Installation under JCreator"/><br/><br/>
	</li>
	<li>
		Call new library collection LWJGL. Click add->path and add the path to where you installed lwjgl. Then click add->Archive and select the 2 .jar files.<br/><br/>
		<img src="_gfx/installation/jcreator-2.jpg" alt="LWJGL Installation under JCreator"/><br/><br/>
	</li>
	<li>
		Make sure the LWJGL library is ticked.<br/><br/>
		<img src="_gfx/installation/jcreator-3.jpg" alt="LWJGL Installation under JCreator"/><br/><br/>
	</li>
</ul>
	

<? require('_include/footer.php'); ?>




See more files for this project here

Lightweight Java Game Library

A Java Game Library extension: 1. Handles the graphics, sound, and input simply 2. Wraps OpenGL, OpenAL, fmod3 and DevIL 3. Hires timers LWJGL currently supports Linux, Mac OS X (10.2 and above) and Windows (98 and above).

Project homepage: http://sourceforge.net/projects/java-game-lib
Programming language(s): C,Java
License: other

  _files/
    tutorials/
      openal_devmaster_lesson1.zip
      openal_devmaster_lesson2.zip
      openal_devmaster_lesson3.zip
      openal_devmaster_lesson5.zip
  _gfx/
    installation/
      eclipse-1.png
      eclipse-2.png
      eclipse-3.png
      eclipse-4.png
      jcreator-1.jpg
      jcreator-2.jpg
      jcreator-3.jpg
      netbeans-1.png
      netbeans-2.png
      netbeans-3.png
    projects/
      alienflux_1.jpg
      alienflux_2.jpg
      alienflux_3.jpg
      alienflux_small_1.jpg
      alienflux_small_2.jpg
      alienflux_small_3.jpg
      cultris_1.jpg
      cultris_2.jpg
      cultris_3.jpg
      cultris_small_1.jpg
      cultris_small_2.jpg
      cultris_small_3.jpg
      diamond_crush_1.jpg
      diamond_crush_2.jpg
      diamond_crush_3.jpg
      diamond_crush_small_1.jpg
      diamond_crush_small_2.jpg
      diamond_crush_small_3.jpg
      dragon_forever_1.png
      dragon_forever_2.png
      dragon_forever_3.png
      dragon_forever_small_1.png
      dragon_forever_small_2.png
      dragon_forever_small_3.png
      drommi_small_1.jpg
      drommi_small_2.jpg
      drommi_small_3.jpg
      extorris_1.jpg
      extorris_2.jpg
      extorris_3.jpg
      extorris_small_1.jpg
      extorris_small_2.jpg
      extorris_small_3.jpg
      hz_1.jpg
      hz_2.jpg
      hz_3.jpg
      hz_small_1.jpg
      hz_small_2.jpg
      hz_small_3.jpg
      illuminati_1.jpg
      illuminati_2.jpg
      illuminati_3.jpg
      illuminati_small_1.jpg
      illuminati_small_2.jpg
      illuminati_small_3.jpg
      jglmark_1.jpg
      jglmark_2.jpg
      jglmark_3.jpg
      jglmark_small_1.jpg
      jglmark_small_2.jpg
      jglmark_small_3.jpg
      keith_goes_painting_1.jpg
      keith_goes_painting_2.jpg
      keith_goes_painting_3.jpg
      keith_goes_painting_small_1.jpg
      keith_goes_painting_small_2.jpg
      keith_goes_painting_small_3.jpg
      monstrumo_1.jpg
      monstrumo_2.jpg
      monstrumo_3.jpg
      monstrumo_small_1.jpg
      monstrumo_small_2.jpg
      monstrumo_small_4.jpg
      puppytron_1.jpg
      puppytron_2.jpg
      puppytron_3.jpg
      puppytron_small_1.jpg
      puppytron_small_2.jpg
      puppytron_small_3.jpg
      slam_soccer_2006_1.jpg
      slam_soccer_2006_2.jpg
      slam_soccer_2006_3.jpg
      slam_soccer_2006_small_1.jpg
      slam_soccer_2006_small_2.jpg
      slam_soccer_2006_small_3.jpg
      starship2d_1.jpg
      starship2d_2.jpg
      starship2d_3.jpg
      starship2d_small_1.jpg
      starship2d_small_2.jpg
      starship2d_small_3.jpg
      strategic_tetris_1.jpg
      strategic_tetris_2.jpg
      strategic_tetris_3.jpg
      strategic_tetris_small_1.jpg
      strategic_tetris_small_2.jpg
      strategic_tetris_small_3.jpg
      subhunt_1.jpg
      subhunt_2.jpg
      subhunt_3.jpg
      subhunt_small_1.jpg
      subhunt_small_2.jpg
      subhunt_small_3.jpg
      superdudester_1.jpg
      superdudester_2.jpg
      superdudester_3.jpg
      superdudester_small_1.jpg
      superdudester_small_2.jpg
      superdudester_small_3.jpg
      technopolies_1.jpg
      technopolies_2.jpg
      technopolies_3.jpg
      technopolies_small_1.jpg
      technopolies_small_2.jpg
      technopolies_small_3.jpg
      titan_attacks_1.jpg
      titan_attacks_2.jpg
      titan_attacks_3.jpg
      titan_attacks_small_1.jpg
      titan_attacks_small_2.jpg
      titan_attacks_small_3.jpg
      tribaltrouble_1.jpg
      tribaltrouble_2.jpg
      tribaltrouble_3.jpg
      tribaltrouble_small_1.jpg
      tribaltrouble_small_2.jpg
      tribaltrouble_small_3.jpg
      typhoon_1.png
      typhoon_2.png
      typhoon_3.png
      typhoon_small_1.png
      typhoon_small_2.png
      typhoon_small_3.png
      ultratron_1.jpg
      ultratron_2.jpg
      ultratron_3.jpg
      ultratron_small_1.jpg
      ultratron_small_2.jpg
      ultratron_small_3.jpg
      vermins_1.jpg
      vermins_2.jpg
      vermins_small_1.jpg
      vermins_small_2.jpg
    tutorials/
      openal/
    background.png
    borderBottom.png
    borderLeft.png
    borderRight.png
    borderTop.png
    button_backwards.png
    button_forwards.png
    button_javanet.png
    button_openal.png
    button_opengl.png
    button_sourceforge.png
    cornerBL.png
    cornerBR.png
    cornerTL.png
    cornerTR.png
    logo.png
    mesh.png
    paypal.png
    seperator.png
  _include/
    footer.php
    header.php
  changelogs/
    0.10-changelog.txt
    0.20-changelog.txt
    0.30-changelog.txt
    0.40-changelog.txt
    0.50-changelog.txt
    0.60-changelog.txt
    0.70-changelog.txt
    0.80-changelog.txt
    0.89-changelog.txt
    0.90-changelog.txt
    0.92-changelog.txt
    0.93-changelog.txt
    0.94-changelog.txt
    0.95-changelog.txt
    0.96-changelog.txt
    0.97-changelog.txt
    0.98-changelog.txt
    0.99-changelog.txt
    1.0-changelog.txt
    1.0-rc1-changelog.txt
    1.0beta-changelog.txt
    1.0beta2-changelog.txt
    1.0beta3-changelog.txt
    1.0beta4-changelog.txt
    1.1-changelog.txt
    1.1.1-changelog.txt
    full-changelog.txt
  jnlp/
    logo.png
    lwjgl-demo.php
    lwjgl.jar
    lwjgl_fmod3.jar
    lwjgl_linux.jar
    lwjgl_media.jar
    lwjgl_test.jar
    lwjgl_util.jar
    lwjgl_win32.jar
    source.php
  about.php
  changelog.php
  contact.php
  credits.php
  demos.php
  documentation.php
  documentation_openal_01.php
  documentation_openal_02.php
  documentation_openal_03.php
  documentation_openal_04.php
  documentation_openal_05.php
  documentation_openal_06.php
  documentation_openal_07.php
  donations.php
  download.php
  faq.php
  favicon.ico
  index.php
  installation.php
  irclog_browse.php
  license.php
  links.php
  picpopup.php
  projects.php
  shop.php
  style.css