LWJGL app cross-platform testing.

I wasn’t entirely certain where to post this topic, but the problem I’ve been having with some of my 3D apps is very inconsistent performance on different platforms- e.g, running indordinately slower on Windows/not at all on Linux.

So, what I have here is a (relatively) simple LWJGL application that creates and renders a small planet using a modified form of fractal terrain generation. EDIT: Have replaced eclipse project with kappa’s spliced jarfile.

This should be a representative screenshot-

http://www.freeimagehosting.net/uploads/c4b45e5b66.png

http://www.filedropper.com/flatearth_1

Could a couple of folks running Windows/Linux download the .jar, and see if it runs smoothly? Thanks in advance.

To export a project as a Jar file in Eclipse, you right click the project name, click “Export”, under Java choose “Jar file”, and then choose your settings.

And there is supposed to be a semicolon between the period and lwjgl.jar :wink:

Well it runs very smoothly on my computer: Windows 7 x64, crappy Intel integrated GMA.

That’s good to hear. :slight_smile: I’ll try exporting as .jar file, but has anyone else had luck in the meantime?

I’d recommend you try the JarSplice tool, it’ll create a single executable jar for you (which includes all your jars and native files). This’ll create a jar that works on Windows, Mac and Linux just by double clicking (so no need to mess with the command line).

No joy, I’m afraid. Exporting as a .jar using eclipse gives the following:
Exception in thread “main” java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

And the .jar I get using JarSplice spits out a ‘jar file is invalid or corrupt’ error. Did you have any luck with that yourself?

Yeh, works fine for me, had a quick go at putting your project through it, produced this. Which works fine here.

You probably missed a step or something.

[quote=“kappa,post:6,topic:36859”]
Yeah, most likely- that .jar you whipped up works fine for me, so thanks for that. What’s the procedure? Make a jar out of everything except lwjgl.jar+natives first? Glad it works smoothly outside the Mac, anyways.

Not difficult to create a executable jar for the above project.

  1. Add all your project jars - since you only use lwjgl.jar and your own classes that all you need to add there. Your src folder wasn’t in a jar/zip so just put it in one and added it to the list.

  2. Add all the natives your project uses - added all the LWJGL *.dll (windows), *.so (linux) and .dylib,.jnilib (mac) natives files to the natives tab.

  3. Add the main class: src.main.Loop

Thats it, click create jar.

I think I followed those steps like you said, but for some reason, when I unpack the jar, the native libraries aren’t included.

Would I be able to recreate this process from the command line?

not at the moment, you can try run the tool via the command line to see if any exceptions are thrown.

[quote=“kappa,post:10,topic:36859”]
That’s where I got the ‘jarfile is invalid or corrupt’ message from. I’m going to see if can just keep the manifest file and the org.ninjacave.jarsplice.core.JarSpliceLauncher.class file, then add in the native libs manually…

Wait! It’s working perfectly now. I think the problem was that I was adding .jars other than the main source and lwjgl.jar (i.e, lwjgl-debug, etc.) Thanks a bunch!

(BTW, there’s a slight bug with parent folders not being displayed when you want to save the final spliced .jar to a different folder-

Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException
at com.apple.laf.AquaMenuPainter.paintSelectedMenuItemBackground(AquaMenuPainter.java:148)
at com.apple.laf.AquaComboBoxRendererInternal.paintComponent(AquaComboBoxRenderer.java:125)

)

[quote]Not at the moment, you can try run the tool via the command line to see if any exceptions are thrown.
[/quote]
Also- I misunderstood you here. I thought you meant running the final .jar from the command line. Anyway, my mistake…

Ah right that explains it, since lwjgl-debug.jar has identical named classes to lwjgl.jar. Will put a warning (better error message) in future versions.

yeh, this is a Mac OS X java bug with the Ocean theme, I’ll see if I can change the LAF to one that works.

thanks