|
From: Leif M. <le...@ta...> - 2006-04-13 16:13:55
|
Geoffrey, > I know that Cruise and the wrapper both have some expectations > regarding your current working directory (something I personally > regard as a sin, but that's just my opinion). I actually agree with you. But the problem is that the working directory is not consistent between running as a console app and running as a service under windows. When run as a service, the working directory is always set to the system32 directory. This means that relative paths in an application become pretty much impossible. I always like being able to write apps that are deployed as a zip or tar file and then unpackaged anyplace and run. Having a known fixed working directory as a base makes everything just work. Newer versions of the wrapper let you change the working directory using the wrapper.working.dir property: http://wrapper.tanukisoftware.org/doc/english/prop-working-dir.html The first couple versions (pre-sourceforge) didn't do this, but it meant a constant stream of path related problems. An app would work differently if you did this: c:\MyDir\MyApp\bin> MyApp.bat versus this: c:\MyDir\MyApp> bin\MyApp.bat As things are now, everything just works regardless of how the app is launched or where it is installed. Cheers, Leif |