I am curious about where would be a good location to store log files on windows. Let's say I have a webstart, or an applet application, therefore there is really no place where they are launched from (no installation directory). So given such a condition, where should I store the log file that program created without being intrusive or dumping a lot of garbage where all that data would be seen.
I have never done anything like this before, but I am very curious now, and really would like to hear some ideas or suggestions.
Thanks to anyone for their help in advance.
QUICK Edit: Let's say I can use absolutely any logging framework or system available (for java), and yes let's say that user has given access to store things within his account (but not general user or anywhere else system related).
If you do not have any security constraint and your webstart or applet application can access file system then you can use $(user.home)
system property.
It will allow the application to store the log file in the user home and would be operating system independent.
For example I am using Log4j and this is the configuration of my log4j.property file
log4j.appender.F.File=${user.home}/app.logs
If you are using default java logging then you can still fetch this system property and assign it is a log file location.
You can also append any location after $(user.home)
if you wants to store the logs in sub directory.
For Example
log4j.appender.F.File=${user.home}/logs/application.log
Amendment:
if you do not want to store anything in home directory, you could get the root directory by navigating upward using getParent until null is returned and once you have root directory you can go to any location in the filesystem