Dienstag, 1. September 2009

Using relative file paths when running as a service/daemon app...

Most service wrapper tools for Java allow for setting the current working directory. This way you can set your apps base to the same path as if you were running it manually.
If you don't, and if you're using Windows, your service will run in the system32 directory and any relative file paths will be expanded from there...

Java Service Wrapper has the wrapper.working.dir property
Apache Commons Daemon has the --StartPath parameter

Keine Kommentare:

Kommentar veröffentlichen

stopsoftwarepatents.eu petition banner