Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  
  Need help with LWJGL/JOGL  (Read 2489 times)
0 Members and 1 Guest are viewing this topic.
Offline DaForgottenEmperor

Junior Newbie





« Posted 2006-07-23 13:52:53 »

I downloaded source code from http://www.cokeandcode.com/spaceinvaders104/spaceinvaders104.zip .
When I try to build it in IntelliJ Idea, i get few errors ;p
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
Information:Note: Some input files use unchecked or unsafe operations.
Information:Compilation completed with 88 errors and 1 warning
Information:88 errors
Information:1 warning
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\jogl\JoglGameWindow.java
    Error:Error:line (8)package net.java.games.jogl does not exist
    Error:Error:line (9)package net.java.games.jogl does not exist
    Error:Error:line (10)package net.java.games.jogl does not exist
    Error:Error:line (11)package net.java.games.jogl does not exist
    Error:Error:line (12)package net.java.games.jogl does not exist
    Error:Error:line (13)package net.java.games.jogl does not exist
    Error:Error:line (14)package net.java.games.jogl does not exist
    Error:Error:line (27)cannot find symbol class GLEventListener
    Error:Error:line (37)cannot find symbol class GLCanvas
    Error:Error:line (39)cannot find symbol class GL
    Error:Error:line (70)cannot find symbol class GL
    Error:Error:line (160)cannot find symbol class GLDrawable
    Error:Error:line (188)cannot find symbol class GLDrawable
    Error:Error:line (217)cannot find symbol class GLDrawable
    Error:Error:line (237)cannot find symbol class GLDrawable
    Error:Error:line (99)cannot find symbol class GLCapabilities
    Error:Error:line (99)cannot find symbol variable GLDrawableFactory
    Error:Error:line (106)cannot find symbol class Animator
    Warning:Warning:line (114)[deprecation] show() in java.awt.Window has been deprecated
    Error:Error:line (165)cannot find symbol variable GL
    Error:Error:line (172)cannot find symbol variable GL
    Error:Error:line (193)cannot find symbol variable GL
    Error:Error:line (194)cannot find symbol variable GL
    Error:Error:line (223)cannot find symbol variable GL
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\jogl\TextureLoader.java
    Error:Error:line (23)package net.java.games.jogl does not exist
    Error:Error:line (41)cannot find symbol class GL
    Error:Error:line (52)cannot find symbol class GL
    Error:Error:line (97)cannot find symbol variable GL
    Error:Error:line (98)cannot find symbol variable GL
    Error:Error:line (99)cannot find symbol variable GL
    Error:Error:line (100)cannot find symbol variable GL
    Error:Error:line (139)cannot find symbol variable GL
    Error:Error:line (141)cannot find symbol variable GL
    Error:Error:line (147)cannot find symbol variable GL
    Error:Error:line (149)cannot find symbol variable GL
    Error:Error:line (150)cannot find symbol variable GL
    Error:Error:line (161)cannot find symbol variable GL
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\jogl\Texture.java
    Error:Error:line (3)package net.java.games.jogl does not exist
    Error:Error:line (51)cannot find symbol class GL
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\lwjgl\TextureLoader.java
    Error:Error:line (24)package org.lwjgl.opengl does not exist
    Error:Error:line (78)cannot find symbol variable GL11
    Error:Error:line (97)cannot find symbol variable GL11
    Error:Error:line (98)cannot find symbol variable GL11
    Error:Error:line (99)cannot find symbol variable GL11
    Error:Error:line (100)cannot find symbol variable GL11
    Error:Error:line (132)cannot find symbol variable GL11
    Error:Error:line (139)cannot find symbol variable GL11
    Error:Error:line (141)cannot find symbol variable GL11
    Error:Error:line (147)cannot find symbol variable GL11
    Error:Error:line (149)cannot find symbol variable GL11
    Error:Error:line (150)cannot find symbol variable GL11
    Error:Error:line (161)cannot find symbol variable GL11
    Error:Error:line (154)cannot find symbol variable GL11
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\lwjgl\Texture.java
    Error:Error:line (3)package org.lwjgl.opengl does not exist
    Error:Error:line (53)cannot find symbol variable GL11
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\lwjgl\LWJGLGameWindow.java
    Error:Error:line (5)package org.lwjgl does not exist
    Error:Error:line (6)package org.lwjgl does not exist
    Error:Error:line (7)package org.lwjgl.input does not exist
    Error:Error:line (8)package org.lwjgl.input does not exist
    Error:Error:line (9)package org.lwjgl.opengl does not exist
    Error:Error:line (10)package org.lwjgl.opengl does not exist
    Error:Error:line (69)cannot find symbol variable Window
    Error:Error:line (70)cannot find symbol variable Window
    Error:Error:line (91)cannot find symbol variable Display
    Error:Error:line (91)cannot find symbol variable Window
    Error:Error:line (94)cannot find symbol variable Mouse
    Error:Error:line (97)cannot find symbol variable GL11
    Error:Error:line (100)cannot find symbol variable GL11
    Error:Error:line (102)cannot find symbol variable GL11
    Error:Error:line (103)cannot find symbol variable GL11
    Error:Error:line (105)cannot find symbol variable GL11
    Error:Error:line (112)cannot find symbol class LWJGLException
    Error:Error:line (141)cannot find symbol variable Keyboard
    Error:Error:line (144)cannot find symbol variable Keyboard
    Error:Error:line (147)cannot find symbol variable Keyboard
    Error:Error:line (151)package org.lwjgl.input does not exist
    Error:Error:line (161)cannot find symbol variable GL11
    Error:Error:line (162)cannot find symbol variable GL11
    Error:Error:line (163)cannot find symbol variable GL11
    Error:Error:line (171)cannot find symbol variable Window
    Error:Error:line (173)cannot find symbol variable Window
    Error:Error:line (173)cannot find symbol variable Keyboard
    Error:Error:line (175)cannot find symbol variable Window
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\SystemTimer.java
    Error:Error:line (3)package com.dnsalias.java.timer does not exist
    Error:Error:line (15)cannot find symbol class AdvancedTimer
    Error:Error:line (22)cannot find symbol variable AdvancedTimer
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\jogl\JoglSprite.java
    Error:Error:line (5)package net.java.games.jogl does not exist
    Error:Error:line (72)cannot find symbol class GL
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\lwjgl\LWJGLSprite.java
    Error:Error:line (5)package org.lwjgl.opengl does not exist


I use the included JDK (Idea 4155).
Any ideas?
Offline Jackal von ÖRF

Junior Member





« Reply #1 - Posted 2006-07-23 17:43:29 »

You need to add the required libraries (JOGL etc.) to the project's classpath (File > Settings > Modules > Libraries > Add Jar/Directory).

Offline DaForgottenEmperor

Junior Newbie





« Reply #2 - Posted 2006-07-23 18:24:49 »

Still doesn't work... I copied whole LWJGL directory to game source dir, and i got even more errors...  Huh
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jackal von ÖRF

Junior Member





« Reply #3 - Posted 2006-07-24 00:22:26 »

I haven't used those libraries, but using them should be like any other library:

1. Download lwjgl-1.0beta2.zip from http://lwjgl.org/download.php
2. Copy the lwjgl.jar file from that ZIP file to a safe place (for example to a directory "lib" in the same place where you keep the project's other files).
3. Add lwjgl.jar to the classpath in the project's settings.

You might also want to get a ZIP with LWJGL's source codes, which you then can link to the JAR file in the classpath configuration page. This will give you quick access to the source and javadocs of the LWJGL library from within the IDE.

That should fix the error messages about the org.lwjgl package and its subpackages not existing. Then do the same things for the other libraries which you need (apparently JOGL and the com.dnsalias.java.timer package, unless it comes with JOGL).

The simplest way to get all required libraries is to copy the same JARs which are used in running the program. Just see what JARs http://www.cokeandcode.com/spaceinvaders104/si104.jnlp uses and copy them manually from WebStart's cache (~\Application Data\Sun\Java\Deployment\cache\javaws).

Offline DaForgottenEmperor

Junior Newbie





« Reply #4 - Posted 2006-07-24 12:42:51 »

Thanks for your help. I don't have problems with libraries any more, but i get some other messages...
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
Information:100 errors
Information:9 warnings
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\opengl\MacOSXDisplay.java
    Error:Error:line (255)cannot find symbol method glGetInteger(int,java.nio.IntBuffer)
    Error:Error:line (256)non-static method glViewport(int,int,int,int) cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\test\opengl\PbufferTest.java
    Error:Error:line (192)non-static method glClear(int) cannot be referenced from a static context
    Error:Error:line (195)non-static method glPushMatrix() cannot be referenced from a static context
    Error:Error:line (197)non-static method glTranslatef(float,float,float) cannot be referenced from a static context
    Error:Error:line (198)non-static method glRotatef(float,float,float,float) cannot be referenced from a static context
   ...
    Error:Error:line (228)non-static method glLoadIdentity() cannot be referenced from a static context
    Error:Error:line (230)non-static method glOrtho(double,double,double,double,double,double) cannot be referenced from a static context
    Error:Error:line (416)non-static method glClear(int) cannot be referenced from a static context
    Error:Error:line (417)non-static method glMatrixMode(int) cannot be referenced from a static context
    Error:Error:line (418)non-static method glLoadIdentity() cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\examples\spaceinvaders\Sprite.java
    Error:Error:line (99)non-static method glPushMatrix() cannot be referenced from a static context
    Error:Error:line (105)non-static method glTranslatef(float,float,float) cannot be referenced from a static context
    Error:Error:line (108)non-static method glBegin(int) cannot be referenced from a static context
    Error:Error:line (110)non-static method glTexCoord2f(float,float) cannot be referenced from a static context
    Error:Error:line (111)non-static method glVertex2f(float,float) cannot be referenced from a static context
    Error:Error:line (113)non-static method glTexCoord2f(float,float) cannot be referenced from a static context
    Error:Error:line (114)non-static method glVertex2f(float,float) cannot be referenced from a static context
    Error:Error:line (116)non-static method glTexCoord2f(float,float) cannot be referenced from a static context
    Error:Error:line (117)non-static method glVertex2f(float,float) cannot be referenced from a static context
    Error:Error:line (119)non-static method glTexCoord2f(float,float) cannot be referenced from a static context
    Error:Error:line (120)non-static method glVertex2f(float,float) cannot be referenced from a static context
    Error:Error:line (122)non-static method glEnd() cannot be referenced from a static context
    Error:Error:line (125)non-static method glPopMatrix() cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\examples\spaceinvaders\TextureLoader.java
    Error:Error:line (111)glGenTextures(int,java.nio.IntBuffer) in org.lwjgl.opengl.GL11 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (164)non-static method glBindTexture(int,int) cannot be referenced from a static context
    Error:Error:line (180)non-static method glTexParameteri(int,int,int) cannot be referenced from a static context
    Error:Error:line (181)non-static method glTexParameteri(int,int,int) cannot be referenced from a static context
    Error:Error:line (185)non-static method glTexImage2D(int,int,int,int,int,int,int,int,java.nio.Buffer) cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\examples\spaceinvaders\SoundManager.java
    Error:Error:line (89)non-static method alSourcei(int,int,int) cannot be referenced from a static context
    Error:Error:line (90)non-static method alSourcePlay(int) cannot be referenced from a static context
    Error:Error:line (100)non-static method alSourcei(int,int,int) cannot be referenced from a static context
    Error:Error:line (101)non-static method alSourcePlay(int) cannot be referenced from a static context
    Error:Error:line (110)alGetSourcei(int,int,int) in org.lwjgl.openal.AL10 cannot be applied to (int,int)
    Error:Error:line (124)alGenSources(int,java.nio.IntBuffer) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (129)non-static method alGetError() cannot be referenced from a static context
    Error:Error:line (150)alGenBuffers(int,java.nio.IntBuffer) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (157)alBufferData(int,int,java.nio.Buffer,int,int) in org.lwjgl.openal.AL10 cannot be applied to (int,int,java.nio.ByteBuffer,int)
    Error:Error:line (175)alSourceStop(int) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (178)alDeleteSources(int,java.nio.IntBuffer) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (183)alDeleteBuffers(int,java.nio.IntBuffer) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\examples\spaceinvaders\Texture.java
    Error:Error:line (92)non-static method glBindTexture(int,int) cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\opengl\glu\Util.java
    Error:Error:line (242)cannot find symbol method glGetInteger(int,java.nio.IntBuffer)
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\test\opengl\shaders\Shader.java
    Error:Error:line (97)non-static method glGetError() cannot be referenced from a static context
    Error:Error:line (121)non-static method glGetString(int) cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\test\openal\BasicTest.java
    Error:Error:line (115)non-static method alGetString(int) cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\java\org\lwjgl\test\openal\PlayTestMemory.java
    Error:Error:line (75)non-static method alIsExtensionPresent(java.lang.String) cannot be referenced from a static context
    Error:Error:line (93)alGenBuffers(int,java.nio.IntBuffer) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (94)non-static method alGetError() cannot be referenced from a static context
    Error:Error:line (99)alGenSources(int,java.nio.IntBuffer) in org.lwjgl.openal.AL10 cannot be applied to (java.nio.IntBuffer)
    Error:Error:line (100)non-static method alGetError() cannot be referenced from a static context
    Error:Error:line (116)alBufferData(int,int,java.nio.Buffer,int,int) in org.lwjgl.openal.AL10 cannot be applied to (int,int,java.nio.ByteBuffer,int)
    Error:Error:line (123)alBufferData(int,int,java.nio.Buffer,int,int) in org.lwjgl.openal.AL10 cannot be applied to (int,int,java.nio.ByteBuffer,int)
    Error:Error:line (130)non-static method alGetError() cannot be referenced from a static context
    Error:Error:line (136)non-static method alSourcei(int,int,int) cannot be referenced from a static context
C:\Documents and Settings\MG\Desktop\spaceinvaders104\spaceinvaders104\org\newdawn\spaceinvaders\jogl\JoglGameWindow.java
Online Riven
« League of Dukes »

JGO Overlord


Medals: 743
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2006-07-24 15:23:08 »

You're loading LWJGL code with JOGL libs.


LWJGL:
GL.glWhatever();
glWhatever(); // using static import


JOGL:
GL gl = ...;
gl.glWhatever();

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
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.

pw (24 views)
2014-07-24 01:59:36

Riven (23 views)
2014-07-23 21:16:32

Riven (18 views)
2014-07-23 21:07:15

Riven (21 views)
2014-07-23 20:56:16

ctomni231 (50 views)
2014-07-18 06:55:21

Zero Volt (45 views)
2014-07-17 23:47:54

danieldean (36 views)
2014-07-17 23:41:23

MustardPeter (39 views)
2014-07-16 23:30:00

Cero (54 views)
2014-07-16 00:42:17

Riven (54 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!