Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Having a hair-pullingly frustrating time trying to install LWJGL  (Read 3221 times)
0 Members and 1 Guest are viewing this topic.
Offline ShadowProtocol

Senior Newbie





« Posted 2010-11-18 04:25:13 »

Hi everyone, I swear I'm 30 minutes from going absolutely ape-%*$^ so im stopping for the night. It took me forever scouring the web getting information on trying to install LWJGL with Eclipse.

Finally I found a website that had an AMAZINGLY SHORT, SIMPLE EASY-TO-FOLLOW guide on installing JOGL with Eclipse, so I went with that and got it going perfectly. Sad thing is, I didn't want JOGL, it was a last resort effort.

To anyone interested, here's the link for installing JOGL: https://sites.google.com/site/justinscsstuff/jogl-tutorials (tutorial 1: Environemnt Setup - takes 15 minutes maximum).
Thanks to that tutorial, I now know how to create a new user library and then create new projects and link the user library (in this case JOGL) to the project.

I'm thinking as I type this, but I would still appreciate some help. If I download LWJGL and put the files in [C:\lib\lwjgl], do I do the same procedure in eclipse as I did with the jogl tutorial? Which JAR files do I need to include in my user library?

Any tutorials afterwords to get the basic frame up and running?

I know I know, i'm a huge pest but I seriously spent a lot of time on this and now I need your help! Thanks so much Javagaming!!
Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #1 - Posted 2010-11-18 04:51:59 »

This is how to set up LWJGL in eclipse: http://lwjgl.org/installation.php#eclipse

As for getting up a frame, you may want to get the source code from one of the LWJGL Demo examples: http://lwjgl.org/demos.php
maye try the Gears Demo

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline Mike

JGO Wizard


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #2 - Posted 2010-11-18 07:07:19 »

Instead of setting the -Djava.library.path parameter you can also just drag the dll (or the file for whatever OS you're using) into the src folder in your project.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2010-11-18 07:45:47 »

There is no installation for LWJGL really. Here's the steps to run an app using LWJGL:

1) Put lwjgl.jar in your project directory somewhere (I use /lib/). Right click your Eclipse project, Properties, Java Build Path, Libraries, Add JAR, add lwjgl.jar.
2) Click Run menu, Run Configurations, select Java Application, click tiny "new" button, type a name, pick your project and main class.
3) On the arguments tab, put "-Djava.library.path=/path/to/dir/containing/lwjgl".

On Windows, if you put the native libs (DLLs) in the root of your project (which is the default working directory when you run your app), then you don't need step 3.

I don't bother with the stupid user libraries. Smiley

Instead of setting the -Djava.library.path parameter you can also just drag the dll (or the file for whatever OS you're using) into the src folder in your project.
Only on Windows, and they have to be in the working directory defined on the Arguments tab, not in the src folder.

Offline ShadowProtocol

Senior Newbie





« Reply #4 - Posted 2010-11-18 18:09:25 »

Topic Creator here:

I'm still confused. The installation linked above for LWJGL in Eclipse follows the same steps as JOGL, but it starts with "after you have installed LWJGL"... but I never did.

Does it mean "download the zip containing LWJGL and extract folder to some location on my harddrive"?

Also, in windows I setup JOGL in C:\lib\jogl2.0, i want to put LWJGL in  C:\lib\lwjgl
I really want to program Java on my Ubuntu machine, and I know how to create a lib folder inside home: \home\shadowprotocol\lib,   but where do people NORMALLY put files like this on their computer?  I don't really understand the \usr, \var, \etc folders, so I don't know if I should be putting EVERYTHING inside my \home folder or not.

Sorry, PLEASE clarify a little more how to install this in eclipse on linux.  <3 lol thank you
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2010-11-18 18:14:11 »

Personally I always like to keep LWJGL in a \Libs directory underneath each project. Otherwise I end up upgrading a shared LWJGL dir and have to check all of my old projects still work ok.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline ShadowProtocol

Senior Newbie





« Reply #6 - Posted 2010-11-18 18:40:56 »

Personally I always like to keep LWJGL in a \Libs directory underneath each project. Otherwise I end up upgrading a shared LWJGL dir and have to check all of my old projects still work ok.

So you create a project, then go to your directory of the project ON YOUR HARD DRIVE and create a 'libs' folder and throw every file pertaining to LWJGL in there?
How do you then tell eclipse that you are using the lwjgl files in your program?

I'm way over my head since I don't know how to make .jar files yet, but how will i include the libs folder inside my project when I compiled and package for end-users?
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 78
Projects: 15


★★★★★


« Reply #7 - Posted 2010-11-18 18:47:34 »

Sorry, PLEASE clarify a little more how to install this in eclipse on linux.  <3 lol thank you

here is how I setup LWJGL with eclipse.

1) extract LWJGL somewhere, so you know where lwjgl.jar is and the folder containing the native files (*.so files on linux).

2) Create a project in eclipse, right click it and click properties. Then click 'Java Build Path' and choose the Libraries tab.

3) click add external jar and select lwjgl.jar, once it appears in the list click the little arrow thing next to the lwjgl.jar name which will bring a drop down list, double click 'Native Library Location' and select the folder containing the native files (*.so files).

and your done, no need to mess with VM parameters Smiley.
Offline ShadowProtocol

Senior Newbie





« Reply #8 - Posted 2010-11-18 18:57:27 »

Thank you Kapta.
Thank you everyone for having patience with a newbie.

Also, I found this link, but it pretty much just summarizes what Kapta has said:
http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)

Thanks again!!
Offline princec

JGO Kernel


Medals: 407
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2010-11-18 21:01:20 »

Also usually add lwjgl_util.jar as well - bunch of useful stuff in there.

I generally explicitly point at the native libraries in my Eclipse launches as well with something like -Djava.library.path=${workspace_loc:LWJGL/native/windows} passed to the VM. (I keep LWJGL up-to-date, in a separate Eclipse project, and keep everything compiling against it. Or I did until it got moved to Java 5 which I can't support yet grr)

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mike

JGO Wizard


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #10 - Posted 2010-11-18 21:02:59 »

Only on Windows, and they have to be in the working directory defined on the Arguments tab, not in the src folder.

Windows=easy ;-)

I have mine in the src folder and it works great without any adjustments... Maybe it doesn't matter.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline cylab

JGO Ninja


Medals: 52



« Reply #11 - Posted 2010-11-18 22:40:18 »

I have mine in the src folder and it works great without any adjustments... Maybe it doesn't matter.
It does Wink, so you either "accidently" have your working directory set to your src dir (unlikely) or a copy (or different version) of the dlls are somewhere else on your PATH (like c:\windows\system32), which can cause serious headaches on lwjgl updates.

Mathias - I Know What [you] Did Last Summer!
Offline princec

JGO Kernel


Medals: 407
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #12 - Posted 2010-11-19 00:03:26 »

Hm doesn't Eclipse copy everything in the src folder to the bin folder it finds that isn't a .java file?

Cas Smiley

Offline cylab

JGO Ninja


Medals: 52



« Reply #13 - Posted 2010-11-19 09:33:20 »

Hm doesn't Eclipse copy everything in the src folder to the bin folder it finds that isn't a .java file?
Maybe, but "bin" is not (by default) the working directory.

Mathias - I Know What [you] Did Last Summer!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (43 views)
2014-10-16 15:22:06

Norakomi (33 views)
2014-10-16 15:20:20

lcass (38 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (86 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!