0
我已经试过:Java io.tempdir在ubuntu上返回null?
class TempDir { public static void main (String[] args) { System.out.println(System.getProperty("java.io.tempdir")); } }
我需要保持一致的脚本Windows和Linux,但是窗户返回临时目录,Ubuntu的返回null,我不知道为什么?
它只是'空',没有错误? – cjstehno
这是你实际运行的程序吗?因为该属性是“java.io.tmpdir”而不是“java.io.tempdir”。 – stdunbar
是的,这是问题!谢谢! –