thelper - 2010-04-09

Hi all,

We have been using JPF for some time now and recently we tried to run our JPF application on Windows 7. A problem with this OS is that by default programs are not allowed to write to the "Program Files" folder. This is a problem for us because we set JPF's shadow folder to the "${applicationRoot}/.jpf-shadow" folder.

We tried the default option (shadow folder is "${}/.jpf-shadow"). This works ok, but a drawback is that on Windows this will point to a folder in the profile of the current user, so each user on that computer will get it's own shadow folder. If you have a lot of users on one computer (e.g. a server) these shadow folders can take up a lot of disk space. An alternative solution would be to add the following code to JPF's Boot class;

   if (System.getProperty("").toLowerCase().startsWith("windows")) {
      props.put("allUsersProfile", System.getenv("ALLUSERSPROFILE"));

This would allow you to set the shadow folder to something like "${allUsersProfile}/.jpf-shadow" so there is only one shadow folder on a server.

What do you think of this suggestion?