无法更改java.io.tmpdir [英] not able to change java.io.tmpdir

查看:281
本文介绍了无法更改java.io.tmpdir的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用此命令更改java.io.tmpdir目录

I am trying to change the java.io.tmpdir directory using this command

java -Djava.io.tmpdir=/temporary

但这没有成功,并显示java命令的'Usage'。
我在RHEL机器中这样做。

But this doesnot succeed and displays the 'Usage' of the java command. I am doing this in a RHEL machine.

提前感谢

我在WebLogiv上部署了一个使用axis2版本1.5的应用程序。我发现axis2 1.5使用java.io.tmpdir来存储它的临时文件。我想要的位置这些临时文件存储。在weblogic中我在何处指定java.io.tmpdir值

I have deployed an application on WebLogiv which uses axis2 version 1.5. I find that axis2 1.5 using java.io.tmpdir to store its temp files. I want the location where these temp files are stored. Where in the weblogic do I specify the java.io.tmpdir value

推荐答案

您需要使用该命令作为运行程序,而不仅仅是 java -Dkey = value

You need to use that command as part of running a program, not just java -Dkey=value.

java -Djava.io.tmpdir=/temporary com.foo.Bar

其中 com。 foo.Bar 是包含 main 方法的类。

可以以编程方式执行此操作。

Alternatively, you can do this programmatically.

System.setProperty("java.io.tmpdir", "/temporary");

这篇关于无法更改java.io.tmpdir的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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