Search code examples
javaenvironment-variablessvnkityajsw

svnkit without environment variables?


I use svnkit to download files from an SVN. When I run my program as a Windows service using YAJSW, the program is run as a System user, where APPDATA is set to some path in C:\Windows. svnkit is then unable to write to that directory.

As I did not find out how to run the YAJSW service as a different user with different environment variables, I would like to know whether I can use svnkit without relying on Windows environment variables.


Solution

  • Turned out that it is much easier to set the directory for svnkit in

    SVNWCUtil.createDefaultAuthenticationManager(new File("D:\\temp\\"),
                user, password.toCharArray());
    

    Then the value of APPDATA does not matter anymore for svnkit.