2009年10月9日

     摘要: Read on to see how to add Subversion support to Eclipse and how to perform basic version-control activities from the IDE.  阅读全文

posted @ 2010-08-01 15:57 祝嘉 阅读(356) | 评论 (0)编辑 收藏

     摘要: 通常許多web資源是面向登錄用戶的,如果我們想利用程序自動獲取,則必須要通過程序登錄之後才能實現。java本身提供的標準庫也可以實現客戶端的登錄,但是卻不能自動管理服務器返回的cookie,必須手動管理。這個是十分麻煩和繁瑣的。幸好有APACHE 的 HTTPCLIENT,我們不必在擔心如何管理cookie。所以用hc登錄,獲取資源都是十分簡單和方便的。在這裡用一段源碼記錄如何使用hc等錄一個website,以及如何通過代理登錄和通過代理訪問頁面。  阅读全文

posted @ 2010-07-29 10:54 祝嘉 阅读(429) | 评论 (0)编辑 收藏

     摘要: 使用Apache的HTTPCLIENT獲取網頁的內容  阅读全文

posted @ 2010-07-28 20:27 祝嘉 阅读(311) | 评论 (0)编辑 收藏

     摘要: The PatternLayout is by far the most widely used log4j layout. It formats logging events according to a conversion pattern specified by the user. Conversion patterns are composed of literal text and conversion specifiers. Literal text is output as is. Conversion specifiers consist of the % character followed by an optional format modifier and a mandatory conversion character. For example, %-5p [%t]: %m%n is a conversion pattern composed of a priority (a.k.a. level) conversion specifier followed   阅读全文

posted @ 2010-07-28 18:50 祝嘉 阅读(536) | 评论 (0)编辑 收藏

     摘要: export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'  阅读全文

posted @ 2010-07-11 23:51 祝嘉 阅读(591) | 评论 (0)编辑 收藏

     摘要: ubuntu下的java中文字体文件名为uming.ttc,而不是通用的uming.ttf,解决方法就是为uming.ttc建一个软链接。
$cd /usr/share/fonts/truetype/arphic/
$sudo ln -s uming.ttc uming.ttf  阅读全文

posted @ 2010-07-10 09:35 祝嘉 阅读(491) | 评论 (0)编辑 收藏

posted @ 2010-05-15 13:19 祝嘉 阅读(340) | 评论 (0)编辑 收藏

     摘要: the approach of writing clone method is:
1.Implements Cloneable interface
2.Override the clone method
2.1 Make the clone method to public method
2.2 Call super.clone() to produce the new object
2.3 Clone members  阅读全文

posted @ 2010-04-21 10:51 祝嘉 阅读(356) | 评论 (0)编辑 收藏

     摘要: Eclipse在Ubuntu9.10(或其他Linux系统)中运行时,经常会出现鼠标点击按钮无效需要键盘的enter键才可以的情况。首先这是一个bug,出现这种情况的原因是新版本的GTK和eclipse冲突。解决办法如下:
在eclipse目录下建一个eclipse-patch文件,在该文件中加入如下代码
#!/bin/bash
export GDK_NATIVE_WINDOWS=true
/你的eclipse目录/eclipse  阅读全文

posted @ 2010-04-18 13:04 祝嘉 阅读(393) | 评论 (0)编辑 收藏

     摘要: 首先是get方式提交乱码,修改tomcat的server.xml。在Connector节点添加URIEncoding="UTF-8"  阅读全文

posted @ 2010-03-24 10:55 祝嘉 阅读(786) | 评论 (0)编辑 收藏

posted @ 2010-03-19 14:15 祝嘉 阅读(920) | 评论 (0)编辑 收藏

     摘要: 在一般默认的情况下,在linux下安装netbeans中文版,你会看到好多小方框。
  阅读全文

posted @ 2009-12-31 12:21 祝嘉 阅读(291) | 评论 (0)编辑 收藏

     摘要: 当JDK更新安装路径改变后,修改NetBeans的默认jdk路径  阅读全文

posted @ 2009-12-28 23:52 祝嘉 阅读(5201) | 评论 (0)编辑 收藏

posted @ 2009-12-15 12:48 祝嘉 阅读(99) | 评论 (0)编辑 收藏

     摘要: 所有类型的 Java 应用程序一般都需要计划重复执行的任务。企业应用程序需要计划每日的日志或者晚间批处理过程。一个 J2SE或者 J2ME 日历应用程序需要根据用户的约定计划闹铃时间。不过,标准的调度类 Timer 和 TimerTask 没有足够的灵活性,无法支持通常需要的计划任务类型。在本文中,Java 开发人员 Tom White 向您展示了如何构建一个简单通用的计划框架,以用于执行任意复杂的计划任务。  阅读全文

posted @ 2009-12-15 12:14 祝嘉 阅读(338) | 评论 (0)编辑 收藏

posted @ 2009-12-14 13:14 祝嘉 阅读(1061) | 评论 (0)编辑 收藏

posted @ 2009-11-15 10:18 祝嘉 阅读(3490) | 评论 (0)编辑 收藏

posted @ 2009-11-02 23:20 祝嘉 阅读(1487) | 评论 (1)编辑 收藏

posted @ 2009-10-24 23:44 祝嘉 阅读(225) | 评论 (0)编辑 收藏

posted @ 2009-10-17 09:37 祝嘉 阅读(92) | 评论 (0)编辑 收藏

posted @ 2009-10-09 22:52 祝嘉 阅读(232) | 评论 (0)编辑 收藏

posted @ 2009-10-09 16:14 祝嘉 阅读(352) | 评论 (0)编辑 收藏