使用Java在Domino服务器上写入临时文件:临时目录的最佳实践是什么? [英] Writing temp files on domino server using java: what is the best practice for the temp directory?

查看:214
本文介绍了使用Java在Domino服务器上写入临时文件:临时目录的最佳实践是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个执行某些附件操作的Java代理,我正在寻找一个可以进行操作的干净"地方-即,管理员设置特殊权限不会有太多麻烦.是否有关于temp目录位置的最佳实践?在Lotusscript中,我将使用

I am writing a Java Agent which does some attachment manipulations and I am looking for a 'clean' place where I can do the manipulations - i.e. won't have too much hassles with admins setting special permissions. Is there a best practise for the location of the temp directory? In Lotusscript I would use

Environ("Temp")

这将为我提供本地计算机的临时目录.

which would give me the temp directory of the local machine.

也有可能使用数据目录,但这使我不安...

There is also the possibility of using the data directory, but that makes me uneasy...

var d = session.getEnvironmentString("directory",true)

有什么建议/最佳建议吗?

Any tips/best recommendations?

推荐答案

一般规则是,如果需要临时目录,则从系统请求它.

The general rule is if you need a temp directory, then request it from the system.

示例:

System.getProperty("java.io.tmpdir")

使用Data文件夹可能会使管理员不高兴.

Using the Data folder is probably going to upset the admin.

如果您想创建诊断日志,以备日后使用,那么我建议写给:

If you want to create diagnostic logs which you may use later then I recommend writing to:

<DOMINO DATA FOLDER>\IBM_TECHNICAL_SUPPORT

这样,管理员可以在一个设置位置查找日志.

This way the admin has one set place to find logs.

这篇关于使用Java在Domino服务器上写入临时文件:临时目录的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆