Unable to change Java io. tmpdir
•
Java
I'm trying to change Java. Net using this command io. TMPDIR directory
java -Djava.io.tmpdir=/temporary
This is not successful and shows the "usage" of Java commands I do this on RHEL machines
Thank you in advance
I deployed an application using axis 2 version 1.5 on weblogiv I found that Axis2 1.5 uses Java io. TMPDIR to store its temporary files Where I want to store these temporary files I specified Java. Net in Weblogic io. TMPDIR value
Solution
You need to use this command as part of the running program, not just Java - dkey = value
java -Djava.io.tmpdir=/temporary com.foo.Bar
Including com foo. Bar is a class that contains the main method
Alternatively, you can do this programmatically
System.setProperty("java.io.tmpdir","/temporary");
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码