darcone
Junior Devvie  
Size matters
|
 |
«
Posted
2003-03-19 15: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?
|
|
|
|
Matzon
|
 |
«
Reply #1 - Posted
2003-03-19 16:50:20 » |
|
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. 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...
|
|
|
|
princec
|
 |
«
Reply #2 - Posted
2003-03-19 18: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 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
darcone
Junior Devvie  
Size matters
|
 |
«
Reply #3 - Posted
2003-03-19 20:29:34 » |
|
Hehe you JET snob  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?
|
|
|
|
coilcore
Senior Newbie 
Java games rock!
|
 |
«
Reply #4 - Posted
2003-03-22 15: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.htmlNow 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.
|
|
|
|
princec
|
 |
«
Reply #5 - Posted
2003-03-22 20: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  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 
|
|
|
|
darcone
Junior Devvie  
Size matters
|
 |
«
Reply #6 - Posted
2003-03-23 11:08:26 » |
|
Yeah, I can wish for getting JET as my birthday present, .. not 
|
|
|
|
Harley Rana
Junior Devvie  
Java games rock!
|
 |
«
Reply #7 - Posted
2003-03-30 03:08:34 » |
|
Hey princec out of curiosity, what was the performace difference between jet optimized, and standard java for you?
|
|
|
|
princec
|
 |
«
Reply #8 - Posted
2003-03-30 08: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 
|
|
|
|
erikd
|
 |
«
Reply #9 - Posted
2003-03-30 13: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!
|
|
swpalmer
|
 |
«
Reply #10 - Posted
2003-03-30 15: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.
|
|
|
|
cfmdobbie
Senior Devvie    Medals: 1
Who, me?
|
 |
«
Reply #11 - Posted
2003-03-30 15:46:42 » |
|
At the risk of effectively posting "Me too!", I have to say I agree with you!  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.
|
|
|
darcone
Junior Devvie  
Size matters
|
 |
«
Reply #12 - Posted
2003-03-30 16:08:42 » |
|
I agree too  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 
|
|
|
|
princec
|
 |
«
Reply #13 - Posted
2003-03-30 17: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 
|
|
|
|
darcone
Junior Devvie  
Size matters
|
 |
«
Reply #14 - Posted
2003-03-30 20:54:43 » |
|
Oh ok so I suppose Alien Flux doesn´t use the 0.5 lwjgl but your devel version?
|
|
|
|
princec
|
 |
«
Reply #15 - Posted
2003-03-31 09: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 
|
|
|
|
erikd
|
 |
«
Reply #16 - Posted
2003-03-31 10:20:23 » |
|
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.
|
|
|
|
swpalmer
|
 |
«
Reply #17 - Posted
2003-03-31 11: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 
|
|
|
|
Matzon
|
 |
«
Reply #18 - Posted
2003-03-31 12: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.
|
|
|
|
darcone
Junior Devvie  
Size matters
|
 |
«
Reply #19 - Posted
2003-03-31 16: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  Btw, anyone know when I will get rid of the YABB Newbie "tag" by my name? 
|
|
|
|
swpalmer
|
 |
«
Reply #20 - Posted
2003-03-31 17: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.
|
|
|
|
Backmask
Junior Devvie  
586: The average IQ needed to understand a PC
|
 |
«
Reply #21 - Posted
2003-04-01 04:19:34 » |
|
darcone
Keep posting... When you are over 100 post you are a " YaBB Full Member"... see princec status :-P
|
|
|
|
darcone
Junior Devvie  
Size matters
|
 |
«
Reply #22 - Posted
2003-04-01 04:41:18 » |
|
Hehe princec is extreme  But I visit this forum 4-5 times a day at least too so I understand him 
|
|
|
|
|