摘要:
1 - java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory 添加包common-logging.jar2 - java.lang.ClassNotFoundException: javax.transaction.Synchronization 添加包jta.jar(hiberante)3 - java.lang.ClassNotFoundException: org.dom4j.DocumentException 添加包dom4j-1.6.1.jar4 - java.lang.Cl... 阅读全文
摘要:
取昨天的日期,本想的截出来日期减一就好了。又一想不对,如果今天是一号怎么办?现有两个办法1:Date as = new Date(new Date().getTime()-24*60*60*1000); SimpleDateFormat matter1 = new SimpleDateFormat("yyyy-MM-dd"); String time = matter1.format(as); System.out.println(time); 取出数字型的时间 再减去24*60*60*1000,就得到昨天的时间了;这个有点过时了!2:Calendar cal = Cal. 阅读全文
摘要:
1、编辑窗口右键单击——》Preferences——》General加号——》Editors加号——》点Text Editors字样——》右下窗口选Backgroud color,右边点掉System Default按钮,点Color右边的颜色框,选择颜色OK。我用的颜色R:191 G:220 U:192,感觉这个颜色对眼睛好2、编辑完成代码,用MyEclipse的代码格式化后,本来不长的代码也被自动转成了多行。虽然自动换行以后在编辑器中一眼就能看到全部的代码,但是可读性却大打折扣,避免出现这种情况的办法是:1.Java代码打开Eclipse的Window菜单,然后Preferences-&g 阅读全文