Chris,

Maybe I'm misunderstanding your question but I use:
  String userdir = System.getProperty("user.dir");
to find where my application is launching from.  I can then access files
relative from that directory (no matter which operating system I'm
actually running on).

- John Wright
Starfire Research

Chris Forrester wrote:
>
> Hey All.. I'm almost totally done my demo
> http://www.geocities.com/Psionic1981
>
> and i need pointers on a few things which others have requested:
>
> (1) File path vs. URL
>
> I want to make the game playable on 'nix boxes, and a few have suggested
> that a URL ("oos/...") resource is the way to go, rather than hard filenames
> ("c:\oos\...")
>
> so i need to know how to get which directory the file is loading up from.
> examples from javaworld point to using
> URL myPath =
> this.getClass().getClassLoader().getSystemResource(this.getClass().getName());
>
> but doing this through forte's build and the jar compiled version just
> doesn't work - the URL returned is null. What's going wrong here? Better
> than that... anyone have any code? I'm just basically looking for the path
> to the jar so that i can go to the (appPath)/meshes/ directory and load all
> the graphics.
>
> (2) Missing Swing components when config app executed from jar.
>
> For my configuration swing applet, I can run the program fine in forte, yet
> when executing from a packaged jar, i'm getting a
> java.lang.NoClassDefFoundError:
> org/netbeans/lib/awtextra/AbsoluteLayout
>
> which is the layout i'm using in my gui app, to precisely control what goes
> where. I was under the assumption that jars and forte dev shared the exact
> same classpaths... what am i missing here?
>
> These are all that are left to hammer out (java.lang.outofmemory errors when
> players > 5 nonwithstanding). 2 player games have run for a few days without
> a single crash.
>
> ------------------------
>
> Chris Forrester
>
> http://www.geocities.com/Psionic81
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to