www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: MrTAToad on June 29, 2007, 04:05:58 pm

Title: How to get demo programs running on Mac
Post by: MrTAToad on June 29, 2007, 04:05:58 pm
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.


Title: Re: How to get demo programs running on Mac
Post by: hytparadisee on June 29, 2007, 04:42:25 pm
Do you mind giving the stack trace? (or at least what exceptions)
Title: Re: How to get demo programs running on Mac
Post by: MrTAToad on June 29, 2007, 04:44:24 pm
The error I get is :

Exception in thread "main" java.lang.NoClassDefFoundError: fps/jar
Title: Re: How to get demo programs running on Mac
Post by: Melssj5 on June 29, 2007, 04:49:24 pm
The java.lang.NoClassDefFoundError you are getting is becausse you are not calling the app from the correct path!
Title: Re: How to get demo programs running on Mac
Post by: MrTAToad on June 29, 2007, 04:59:07 pm
What is the correct path for a Mac - or rather, what is the full command line needed ?
Title: Re: How to get demo programs running on Mac
Post by: EgonOlsen on June 29, 2007, 07:50:25 pm
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....!?
Title: Re: How to get demo programs running on Mac
Post by: MrTAToad on June 29, 2007, 08:10:54 pm
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

Title: Re: How to get demo programs running on Mac
Post by: MrTAToad on June 29, 2007, 08:27:57 pm
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

Title: Re: How to get demo programs running on Mac
Post by: Melssj5 on June 29, 2007, 10:07:21 pm
Both llok exactly to me, which was the diference between this and the last one?
Title: Re: How to get demo programs running on Mac
Post by: MrTAToad on June 29, 2007, 11:59:08 pm
It was probably the use of / instead of \ that did it.

Now to learn Java!
Title: Re: How to get demo programs running on Mac
Post by: hytparadisee on June 30, 2007, 05:11:56 am
Ya ur right. Unix based never accepts "\"
Title: Re: How to get demo programs running on Mac
Post by: cyberkilla on July 08, 2007, 04:30:02 am
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.