Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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  
  Distributing games  (Read 4143 times)
0 Members and 1 Guest are viewing this topic.
Offline darcone

Junior Member




Size matters


« Posted 2003-03-19 16:03:07 »

I installed lwjgl and got it working with netbeans after putting all the files in the ext/ dir under java sdk. Problem is that when I try to run the application from the command prompt, I get noclassdeffounderror org/lwjgl/opengl etc... How can I fix this?

And one other thing. If I would like to distribute anything, like a game or anything, using lwjgl, how would I package it and what would the client have to install to get it all to work?
Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #1 - Posted 2003-03-19 17:50:20 »

Quote
I get noclassdeffounderror org/lwjgl/opengl

lwjgl.jar needs to be in your classpath somehow...

I usually just have a lwjgl.jar and it's companion dll's (lwjgl.dll & OpenAL32.dll)in the base dir too. I then run the application using java -cp lwjgl.jar;<additional classes>; <class>

To run directly from Netbeans, I would suspect that you need to mount the lwjgl.jar in order to get it onto your classpath.

Quote
how would I package it and what would the client have to install to get it all to work?

Assuming your game is in MyGame.jar, and that the jar is placed in the root directory just place lwjgl.jar, lwjgl.dll & OpenAL32.dll alongside.

Then start the game using java -cp MyGame.jar;lwjgl.jar; <game to start>.

Using java -jar MyGame.jar needs some way of telling that it depends on lwjgl.jar - haven't done anything of this kind though...

Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2003-03-19 19:56:33 »

I simply ship the whole game in one jar. (Well, actually I compile it into an .exe but that's another story).

Cas Smiley

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

Junior Member




Size matters


« Reply #3 - Posted 2003-03-19 21:29:34 »

Hehe you JET snob Wink
Well do you extract all the files from the lwjgl and put them in one jar with all the other files that belong to the game?
Offline coilcore

Senior Newbie




Java games rock!


« Reply #4 - Posted 2003-03-22 16:20:31 »

As far as class libraries usually the best thing to do is to make your on jar manifest file (META-INF/MANIFEST.MF) where in you can specify classpaths to other jar files. The manifest also lets you control things like the base class to use and signed classes if your into that kind of thing.

Once its all done.  Pack all the libraries and your own code into the single jar.  Then like automagic you type 'java -jar myjar.jar' and everything just falls into place.

Look at
http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html

Now a more complex question and one that has been bothering me is the question of the JRE itself.  Currently you either need to ship out your package and hope they have a JRE installed or make several distributables for each OS you want to "support", which include your package plus the JRE.  I've been thinking about how to sidestep this without going the InstallAnywhere route.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2003-03-22 21:16:52 »

I've got to say my solution is rather more brute force - bung everything in one fat jar file - but it's easy Smiley

That's what I build my Jet executable from, then I run it through JetPerfect (the bit that cost me 500 of the Queen's pounds) and bingo, one nice small .exe that runs like a greased weasel without any installation woes.

Cas Smiley

Offline darcone

Junior Member




Size matters


« Reply #6 - Posted 2003-03-23 12:08:26 »

Yeah, I can wish for getting JET as my birthday present, .. not Smiley
Offline Harley Rana

Junior Member




Java games rock!


« Reply #7 - Posted 2003-03-30 05:08:34 »

Hey princec out of curiosity, what was the performace difference between jet optimized, and standard java for you?

Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2003-03-30 10:35:15 »

Jet's approximately the same speed as -server, but with instantaneous startup time and 100% full speed from the off. For Alien Flux anyway. And the terrain demo.

GC in Jet may be better - I never see a single dropped frame after all the resources have been loaded - not a single one. Memory consumption is better.

Cas Smiley

Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #9 - Posted 2003-03-30 15:29:33 »

As a side note, don't you think it's probably time for Sun to start supporting native compilation? I mean for these kind of apps, it seems to me it makes no sense to completely dismiss it.

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

JGO Coder




Where's the Kaboom?


« Reply #10 - Posted 2003-03-30 17:26:07 »

I hope they never spend their time on native compilation instead of improving the language and VM.   Princec's results just show what I had beleived before.  Native compilation doesn't help execution speed, and ties the result to a single platform.  For me I can live with the slightly longer startup.  Making multiple targets is more of a bother for me than the drawbacks that a standard JAR might have.

If you want to do native compilation because the benefits are important to you (faster startup and consistant operation from the get go can be significant)  - you can! Use JET.   Sun doesn't have the resources to do everything, so let the JET guys have that.  
There is enough to improve with what Sun already has.

Offline cfmdobbie

Senior Member




Who, me?


« Reply #11 - Posted 2003-03-30 17:46:42 »

At the risk of effectively posting "Me too!", I have to say I agree with you! Grin

No one company should handle every interaction with a system such as Java - that would tend things towards a monopolistic control and end up with another Microsoft.  Sun can concentrate on making Java a great language and platform, and other people can handle native compilation.

Hey, it provides revenue for people like Excelsior!

Hellomynameis Charlie Dobbie.
Offline darcone

Junior Member




Size matters


« Reply #12 - Posted 2003-03-30 18:08:42 »

I agree too Smiley

By the way, any idea when a new LWJGL will be released? I have had some people having problems and weird crashes when trying to run my game using it... great work by the way! I hope you will have the motivation to continue working on it for many many years to come Wink
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #13 - Posted 2003-03-30 19:31:10 »

Let's assume we'll get 0.6 out of the door when Alien Flux works, which right now seems to either crash unexpectedly or work perfectly depending on whether there's an R in the month and a number I just thought of matches another number...

Cas Smiley

Offline darcone

Junior Member




Size matters


« Reply #14 - Posted 2003-03-30 22:54:43 »

Oh ok so I suppose Alien Flux doesn&acute;t use the 0.5 lwjgl but your devel version?
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2003-03-31 11:36:50 »

'srite. You can compile it from the CVS. Or of course you can just lift the code straight out of AlienFlux (open the jar, delete all the files that aren't in org/...) and use the DLLs I've compiled for you.

Sneaky way of getting an "early access" release eh?

Cas Smiley

Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #16 - Posted 2003-03-31 12:20:23 »

Quote
I hope they never spend their time on native compilation instead of improving the language and VM.


Yeah, well I agree with you here.
I was not clear: I was just questioning the position Sun is taking that it seems to simply dismiss the idea completely where it does have its uses here and there. They don't actually have to make native compilers.

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #17 - Posted 2003-03-31 13:22:51 »

On another note... is there any news on the Mac OS X version of LWJGL?

I'm a recent switcher, since I got work to buy me a Powerbook.  I just grabber the source from CVS, but I'm so green on Mac OS X programming, or even any unix programming that I don't think I can do much with it my self.  Although if I can spare some time I wouldn't mind helping out a little with the port.  I can at least help play games, er...  test it  Smiley

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #18 - Posted 2003-03-31 14:54:47 »

AFAIK, Gregory Pierce who is working on it - is a bit tied up with Real Life. He works for CNN which as you know are a bit more busy than usual.

Offline darcone

Junior Member




Size matters


« Reply #19 - Posted 2003-03-31 18:39:48 »

Hmm would be nice to have LWJGL working on macintosh as well, although I am not planning to even touch one, but could be nice if it worked on that platform as well Wink

Btw, anyone know when I will get rid of the YABB Newbie "tag" by my name? Wink
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #20 - Posted 2003-03-31 19:41:30 »


Well I just contacted Mr. Pierce to see what the situation was and he suggested that perhaps we could work jointly on the Mac OS X port.  I'm pretty green on the Mac APIs but I think together we can get the ball rolling again on the Mac port.

Offline Backmask

Junior Member




586: The average IQ needed to understand a PC


« Reply #21 - Posted 2003-04-01 06:19:34 »

darcone

Keep posting... When you are over 100 post you are a " YaBB Full Member"... see princec status :-P

Offline darcone

Junior Member




Size matters


« Reply #22 - Posted 2003-04-01 06:41:18 »

Hehe princec is extreme Smiley
But I visit this forum 4-5 times a day at least too so I understand him Smiley
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.

xsi3rr4x (20 views)
2014-04-15 18:08:23

BurntPizza (16 views)
2014-04-15 03:46:01

UprightPath (29 views)
2014-04-14 17:39:50

UprightPath (14 views)
2014-04-14 17:35:47

Porlus (30 views)
2014-04-14 15:48:38

tom_mai78101 (55 views)
2014-04-10 04:04:31

BurntPizza (112 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!