Best Story I System.out.println("total memory is: " + java.lang.Runtime.getRuntime().totalMemory() / 1024); System.out.println("free memory is: " + java.lang.Runtime.getRuntime().freeMemory() / 1024);
Best Story II System.out.println("the caller is " + sun.reflect.Reflection.getCallerClass(0)); System.out.println("the caller is " + sun.reflect.Reflection.getCallerClass(1)); System.out.println("the caller is " + sun.reflect.Reflection.getCallerClass(2)); //足矣。
Best Story III 接着上一个故事,我们又调一个系统,这次是kevin的struts框架的程序搬家失败了,不能在weblogic上用。读ApplicationResources.properties文件失败,我们在ApplicationResources.properties文件里改了各种可能,都不行。 我们改用struts范例,部署也不成功。 我们换了一台服务器,范例部署成功了,而业务程序部署依然错误。 改程序吧,kevin改了几次,没效果。 我们能判定的是:weblogic版本对应用系统的表现有影响。 kevin和离岛狂人一起比较了weblogic的版本,发现不能部署struts范例的系统是根本没补丁的。有补丁也是sp2。 安装sp4?