java
yougucao379548695
好好工作,天天上网!
展开
-
JAVA实用技巧:定时执行任务的三种方法
1)java.util.Timer 这个方法应该是最常用的,不过这个方法需要手工启动你的任务: Timer timer=new Timer(); timer.schedule(new ListByDayTimerTask(),10000,86400000); 这里的ListByDayTimerTask类必须extends TimerTask里面的run()方法。 ...原创 2010-05-12 09:54:10 · 81 阅读 · 0 评论 -
Windows XP IE6.0 Java Applet 无法显示解决方案
Internet Explorer 4.x 及更高版本 1. 单击“工具”-->“Internet 选项” 2. 选择“高级”选项卡,并向下滚动到“Java (Sun)” 3. 选中“使用 Java 版本”旁边的复选框 4. 接下来选择“安全”选项卡,然后选择“自定义级别”按钮 5. 向下滚动到“Java 小程序脚本” 6. ...原创 2011-09-16 16:06:23 · 177 阅读 · 0 评论 -
java 上传图片同时获得图片的宽和高
public ActionForward upload(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { FileForm fileForm = (FileForm) form; For...原创 2011-09-16 16:13:31 · 198 阅读 · 0 评论 -
运行时获取泛型T
在编译期间T被搞成Object,类型丢失,所以是不能直接取到的.但有时可以变通地取到,比如: public class GenericType<T> { protected GenericType() { Type superclass = getClass().getGenericSuperclass(); if (!(superclass ...原创 2012-02-01 09:01:16 · 121 阅读 · 0 评论