Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (512)
Games in Android Showcase (121)
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  
  Using GCJ with LWJGL?  (Read 2321 times)
0 Members and 1 Guest are viewing this topic.
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Posted 2005-11-30 00:28:03 »

I tried compiling one of my games using GCJ and it said
1  
2  
BestGameEver.java:7: error: Class or interface `org.lwjgl.opengl.glu.GLU' not found in import.
   import org.lwjgl.opengl.glu.GLU;

My game uses LWJGL, obviously. So is it possible to use GCJ at all?

See my work:
OTC Software
Offline Vorax

Senior Duke


Projects: 1


System shutting down in 5..4..3...


« Reply #1 - Posted 2005-11-30 01:07:20 »

I don't konw GJC, but this looks like a classpath problem - ie: the compiler can't  find the lwgjl jar.

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #2 - Posted 2005-11-30 23:09:23 »

Yeah, which is odd because I have the .jar in my Java extensions folder, so everything should be able to read it. So I thought.

See my work:
OTC Software
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #3 - Posted 2005-12-01 07:00:58 »

never install lwjgl in the extension folder, it's asking for trouble!
always install it in its own folder and point to it using classpath and java.library.path

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #4 - Posted 2005-12-02 07:49:10 »

Yeah, people have told me not to do this, but never told me why. What's the problem exactly? And don't I have to put the .dll files there anyway?

And as another question: if I'm compiling through the unix box how do I set the classpath correctly? I only know how to do it with a compiler.

See my work:
OTC Software
Offline tom
« Reply #5 - Posted 2005-12-02 13:40:11 »

Because you'll end up with multple versions of the files in the classpath. Other LWJGL applications will crash because it uses your files in the ext directory wich is a of a different version. Nigthmare, so just don't do it.

Offline g666

Junior Duke





« Reply #6 - Posted 2005-12-02 14:51:49 »

Yea I couldnt run your game because of it.

desperately seeking sanity
Offline Torquemada

Senior Newbie




Java games rock!


« Reply #7 - Posted 2005-12-03 03:55:09 »

This might be a bit off-topic but are there any windows binaries of GCJ? Does MingW provide it?

*thinks the layout of the gcc site is confusing.. links to links to links...*

Nm.. http://www.thisiscool.com/gcc_mingw.htm
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #8 - Posted 2005-12-04 21:15:06 »

Okay, so if I have it in the classpath and create a jar, can I bundle the LWJGL jars inside my jar and have it work? I've never bothered doing this the correct way because I keep getting issues with it.

Also, if I have the .dll files in the classpath will that work correctly as well? I thought that I flat out needed these in the ext folder.

Thanks guys.

See my work:
OTC Software
Offline cylab

JGO Ninja


Medals: 52



« Reply #9 - Posted 2005-12-05 12:39:22 »

You have to have the .dll-files in your java.library.path.

There are three ways to do this:

- either have your .ddls in the working directory
  (eg. placing it beside your excutable jar and state in your readme, that one has to start the game from this directory)

- place the files in the PATH-environment
  (eg. use a start-script, that adds the appropriate directory to the PATH-environment variable)

- or start the jar with -Djava.library.path=<path-to-natives-directory>
  (eg. use a start-script, that calls java with this system property set to the appropriate directory)

I am not sure, if it is possible to use GCJ to compile a LWJGL game. It seems unlikely to me and even if it works, it might not give a runtime performance gain (if this is what you are after...).

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #10 - Posted 2005-12-05 16:54:04 »

Thanks very much for the help.

I thought I might as well try GCJ with LWJGL, because one of the reasons keeping me from using it in the first place is Swing. As I'm not using it now, I thought I'd give it a shot and see what happens.

See my work:
OTC Software
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.

theagentd (12 views)
2014-10-25 15:46:29

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

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

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

lcass (39 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
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!