How to get demo programs running on Mac

Started by MrTAToad, June 29, 2007, 04:05:58 PM

Previous topic - Next topic

MrTAToad

Hello

How do you get the demo programs (that come with the SDK) running ? I've tried calling the files, but I just get an exception error.



hytparadisee

Do you mind giving the stack trace? (or at least what exceptions)
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution

MrTAToad

The error I get is :

Exception in thread "main" java.lang.NoClassDefFoundError: fps/jar

Melssj5

The java.lang.NoClassDefFoundError you are getting is becausse you are not calling the app from the correct path!
Nada por ahora

MrTAToad

What is the correct path for a Mac - or rather, what is the full command line needed ?

EgonOlsen

I'm not sure myself. For Windows its like it's done in the bat-files. For Unix, it's similar, but with ":" as the path-seperator. Maybe it works that way on Mac too? I.e. something like java -cp fps.jar:lib/jpct.jar etc....!?

MrTAToad

I've tried :

java -Djava.library.path=..\..\lib\lwjgl-1.0 -cp ..\..\lib\lwjgl-1.0\lwjgl.jar:..\..\lib\jpct\jpct.jar:fps.jar -Xmx128m JPCTDemo width=512 height=384 mipmap zbuffer=16 refresh=60, and unfortunately, I get :

Exception in thread "main" java.lang.NoClassDefFoundError: com/threed/jpct/BufferedMatrix


MrTAToad

Good news - got it working in the end.

It was :

java -Djava.library.path=../../lib/lwjgl-1.0/ -cp ../../lib/lwjgl-1.0/lwjgl.jar:../../lib/jpct/jpct.jar:fps.jar -Xmx128m JPCTDemo width=512 height=384 mipmap zbuffer=16 refresh=60


Melssj5

Both llok exactly to me, which was the diference between this and the last one?
Nada por ahora

MrTAToad

It was probably the use of / instead of \ that did it.

Now to learn Java!

hytparadisee

Ya ur right. Unix based never accepts "\"
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution

cyberkilla

Which is understandable, because all characters are thought through.
Heck, I don't pretend to know everything about the thing, but...

The backslash \ character escapes the character to the right of it, so a path like that would be complicated.

C:\\something\\something\ else\\

"\ " escapes a space.

So, /home/user/file.ext is much better.
I run Ubuntu Feisty, and I'd be glad to help if somebody needs anything tested in Linux.


Also, the filesystem is better, in my opinion.

In windows, you have A-Z of drive letters.

A:\\ is normally floppy, C:\\ normally hdd partition 1, D:\\ & E:\\ normally cd drives.

In linux, every device seems to have a file pointer in /dev folder. These reference the device itself.
You can mount filesystems on a device, and link them to any folder you want.

And, ext3 filesystem is supposed to be so good at managing files that is almost never required a defragmentation - thats why its so rare to find a linux defrag tool.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG