笔记 when in HAL

java.exe 有可能被装到system下 所以切换环境变量JDK版本换不掉 

 

公有部分往上移动 class
不再循环做的事不要放在循环里

 

每个.close() 必修包含在try快中   --JDBC

 

FileWriter fw;
   try {
    fw = new FileWriter(new File("c:/ForceExpire.txt"));
fw.write("ForceExpire "+new Date());
       fw.close(); 
   } catch (IOException e) {
    e.printStackTrace();
   }  // debug  看代码是否经过  当无法debug的时候

 

System.getProperties().list(System.out);  输出所有System.getProperties()

 

在GC输出的环境下,大压力下做多天的测试。(可以在 JAVA_OPTS增加-verbose:gc -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError)

 

 heapdump
java -Xrunhprof:help

 

 

你可能感兴趣的:(java,jdk,C++,c,jdbc)