前言:

在web编程技术内幕中看到一个用apache组件进行文件下载的例子,对于DiskFileUpload类的setRepositoryPath方法,设置临时文件的存放路径,里面指出如果不调用该方法指定绝对路径。那么会使用"java.io.tempdir"这个环境属性的值。想到前面没有遇到过这个环境属性,这里列举出所有环境属性。代码如下:

1         Properties properties = System.getProperties();
2         Enumeration names = properties.propertyNames();
3         String propertyName;
4         while (names.hasMoreElements()) {
5             propertyName = (String) names.nextElement();
6             System.out.print(propertyName + ":");
7             System.out.println(properties.getProperty(propertyName));
8         }
getSysProps

相关文章:

  • 2021-07-31
  • 2022-02-04
  • 2022-02-20
  • 2021-06-11
  • 2022-02-10
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2021-04-08
  • 2021-11-16
  • 2021-09-28
  • 2021-11-04
  • 2021-04-12
  • 2022-12-23
相关资源
相似解决方案