- public static void getJVMAttribute() {
- try {
- 获取JVM属性
- Properties properties=System.getProperties();
- PrintWriter out=null;
- out = new PrintWriter(new File("jvm-file.txt"));
- properties.list(out);
- out.flush();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- public static void getJVMEncoding() {
- System.getProperty("file.encoding");
- }