Installation Trouble

Started by Dr.Digit, May 09, 2006, 01:59:08

Previous topic - Next topic

Dr.Digit

...if you call this installation, that is.  I call it importing a few libraries into eclipse, but why won't it work?

I create a new project and I import all the libraries, correct?  Okay, then why don't some classes appear in the libraries which clearly exist according to the javadoc.

Secondly, I set the VM path for the dlls, but this shouldn't effect compiling, should it?  I don't understand the significance of the dlls, could some one please explain this too?

Thanks.

Here's a screenshot

baysmith

In that screenshot, the javadoc is for org.lwjgl.util.GL, but the import statement is for org.lwjgl.opengl.GL.

Matzon

the util.GL class is just a proxy class for all GL commands - you might want to use org.lwjgl.opengl.GL11 (for opengl 1.1 commands)

Dr.Digit

Ok, that's embarrassing, sorry.  However, I still have the same basic question.

I installed the libraries and figured the best way to get used to the libraries is to view a few sample programs.

I tried compiling this one but those classes imported files that weren't in any libraries, even the one's linked to in that tutorial, so I was lost there.  Then I looked on the projects page and found an open source project, but the same problem, it also referenced classes that didn't exist.

So my question is what am I missing, and are there any simple programs that I can compile?  All I need is one starting program and the rest I can figure out through javadoc.

EDIT: So, I can run those test programs [org.lwjgl.test.] through the console.  I'm just having trouble compiling in eclipe.  I followed the installation guide for eclipe, and I set the VM paths, but when I run a file it tells me there is no main class found, which is weird because I did specify the main class and the main class does have a main method.

Sardtok

You also have to set up the classpath in your environment variables to . (current directory)...
Or else you need to set the classpath to current directory when running the prog, this was very annoying for a while as I didn't have this set up, made me crazy having to set -cp . in every java command I used... ;)
igg -- Take me off for great justice?

Dr.Digit

Quote from: "Sardtok"You also have to set up the classpath in your environment variables to . (current directory)...
Or else you need to set the classpath to current directory when running the prog, this was very annoying for a while as I didn't have this set up, made me crazy having to set -cp . in every java command I used... ;)

Hm, not sure what you mean.  I looked up what classpaths are in eclipse, but I'm still confused and I don't see a point to them.  In fact, when I add them it just prevents the code from compiling.  See, the code's compiling now but I'm getting "main type not found" whenever I try to run it.

Sardtok

Are you trying to run from within Eclipse?
Cause then I can't tell what the problem is, but if you're not:
I suspect you are running windows (on linux you'll have to edit some shell script, can't remember its name as I rarely actually do anything on my proxy)...
Anyway,
go into System Properties (right click my compy and properties, or if you have a shortcut and not a hard link go into control panel and choose system)...

Select the Advanced Tab, then click Environment Variables
In the System Variables list locate CLASSPATH, if it doesn't exist create it...
Then add ;.; (; separates different paths if you didn't happen to know)
Here's my classpath:
C:\Program Files\QuickTime\QTSystem\QTJava.zip;%LWJGL_HOME%\jar\lwjgl.jar;%LWJGL_HOME%\jar\lwjgl_devil.jar;.

Notice the last one being just .
Now, you'd have to set up a $LWJGL_HOME var as well to get that %LWJGL_HOME5 to work...
If it still says no Main class found, then maybe it's packed as a jar, and the meta file isn't properly set up...
igg -- Take me off for great justice?

Dr.Digit

Quote from: "Sardtok"Are you trying to run from within Eclipse?

Yes.  I don't understand it.  I've used other libraries for handling graphics before and all I have to do is import them.  What makes lwjgl so different?

Evil-Devil

have you added the "-Djava.library.path=<path to lwjgl libraries>" to the vm arguments field within the Run Options of your current project?