← Back to team overview

dhis2-devs team mailing list archive

Re: dhis lite

 

2009/4/2 Bob Jolliffe <bobjolliffe@xxxxxxxxx>

> Great.  Works like a charm.  Specially on Windoze.  The application is
> now self referencing - just double click on the executable jar (or a
> shortcut to it) and it figures out the rest from there.  (Knut: In
> fact it will work really well off a usb stick - no setup required).



I've had a look its become very cool.


>
> A bit weird on linux.  If you double click on the jar from gnome, the
> system property (user.dir) is set to the users home directory which is
> a bit annoying.


This IS annoying, Sun says this about system properties:

"user.dir" User working directory  "user.home" User home directory
Maybe you are running a different java implementation..



> Works fine if you start from the command shell in the
> right directory.  There is another (more convoluted) way to get at the
> URL of the containing directory of the jar other than through user.dir
> system property:  get a reference to any resource in the jar and then
> unpick the directory from that. I'm not going to bother for the moment
> as I'm pretty sure 99% of the target market at the moment is Windoze,
> but should fix later.
>
> Cheers
> Bob
>
> PS. can we make it look for dhis2.home regardless of whether
> DHIS2_HOME is set or not - and take precedence?  Otherwise I have to
> unset DHIS2_HOME.  There will be no effect on applications which do
> not set the dhis2.home property.
>

Sure. I was just a little afraid of doing this right before the release as
we would have limited testing, but I guess this can't go wrong.

Follow ups

References