开发者

Tmp issues with java service on windows 2008 service

I am having a rather nasty problem with windows 2008 server. We have a java application that is running as a service using the local services user. The problem is this user开发者_运维技巧 does not have access to read/write to the specified java tmp directory (specified by the system). This means that every time the application tries to create a tmp file an IOException is thrown.

Is there any way to make a java application that need access to the tmp directory run as a service without:

  • Creating a new user specifically for the purspose
  • Specifying a new tmp directory (which you will have to clean up yourself)

  • Is there a reason you can't give the 'NT AUTHORITY\LocalService' account permissions to write to Java's default temp directory?


    From http://www.rgagnon.com/javadetails/java-0484.html

    The location of the directory used to hold temporary files is defined by the property java.io.tmpdir.
    The default value can be changed with the command line used to launch the JVM :

    java -Djava.io.tmpdir=C:\mydir  myClass
    

    or , on Windows, you can set the environment variable TMP to a different value.

    0

    上一篇:

    下一篇:

    精彩评论

    暂无评论...
    验证码 换一张
    取 消

    最新问答

    问答排行榜