摘要: Sun has rolled out the Temple of Sun Contest with a US$5,000 cash prize. This is a great vehicle to promote Sun Studio on campus.
閱讀全文
posted @
2007-04-24 11:00 wqwqwqwqwq 閱讀(1355) |
評論 (2) |
編輯 收藏
摘要: ANT是一個基于JAVA的自動化腳本引擎,腳本格式為XML。除了做JAVA編譯相關任務外,ANT還可以通過插件實現(xiàn)很多應用的調用。
閱讀全文
posted @
2007-04-19 14:56 wqwqwqwqwq 閱讀(246) |
評論 (0) |
編輯 收藏
摘要: 軟件開發(fā)習慣中一個細微更改都可能會對軟件質量產生巨大改進。將單元測試合并到開發(fā)過程中,然后從長遠角度來看它可以節(jié)省多少時間和精力。本文通過使用代碼樣本說明了單元測試的種種好處,特別是使用 Ant 和 JUnit 帶來的各種方便。
閱讀全文
posted @
2007-04-19 14:52 wqwqwqwqwq 閱讀(474) |
評論 (0) |
編輯 收藏
摘要: 在Ant出現(xiàn)之前,構建和部署Java應用需要使用包括特定平臺的腳本、Make文件、各種版本的IDE甚至手工操作的“大雜燴”?,F(xiàn)在,幾乎所有的開源 Java項目都在使用Ant,大多數(shù)公司的內部項目也在使用Ant。Ant在這些項目中的廣泛使用自然導致了讀者對一整套Ant最佳實踐的迫切需求。
閱讀全文
posted @
2007-04-19 14:45 wqwqwqwqwq 閱讀(487) |
評論 (0) |
編輯 收藏
摘要: By the way,there is a tool,Sun Device Detection Tool ,which is based on jnlp protocol, can tell us in just a few minutes whether the Solaris OS supports the devices that are detected in our x86 system, in advance.
閱讀全文
posted @
2007-04-14 23:52 wqwqwqwqwq 閱讀(1274) |
評論 (0) |
編輯 收藏
摘要: 昨晚同學找我?guī)兔懸粋€利用GOOGLE API的小程序,也比較感興趣所以就應下了。下載了GOOGLE提供的googleapi.jar,大約花了20多分鐘,寫了這個小程序,由于需要提供GOOGLE key所以也懶得去申請,就沒有測試~~呵呵
閱讀全文
posted @
2007-04-14 15:22 wqwqwqwqwq 閱讀(3562) |
評論 (9) |
編輯 收藏
摘要: 元數(shù)據是利用JDBC創(chuàng)建和操作數(shù)據庫對象的一個很重要的概念和應用,所以今天我特地的找了一些詳細解析個概念的資料,和利用java來操作的實例。
閱讀全文
posted @
2007-04-12 23:58 wqwqwqwqwq 閱讀(1719) |
評論 (0) |
編輯 收藏
出于java的安全限制,System.getProperty("line.seperator")是不能夠直接取得的??梢赃@樣做:
String lineSeparator = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));
具體參考java.io.BufferedWriter的源代碼就可以找到上面這行代碼。 DriverManager里也有
1 private static void loadInitialDrivers() {
2 String drivers;
3
4 try {
5 drivers = (String) java.security.AccessController
6 .doPrivileged(new sun.security.action.GetPropertyAction(
7 "jdbc.drivers"));
8 } catch (Exception ex) {
9 drivers = null;
10 }
11 println("DriverManager.initialize: jdbc.drivers = " + drivers);
12 if (drivers == null) {
13 return;
14 }
15 while (drivers.length() != 0) {
16 int x = drivers.indexOf(':');
17 String driver;
18 if (x < 0) {
19 driver = drivers;
20 drivers = "";
21 } else {
22 driver = drivers.substring(0, x);
23 drivers = drivers.substring(x + 1);
24 }
25 if (driver.length() == 0) {
26 continue;
27 }
28 try {
29 println("DriverManager.Initialize: loading " + driver);
30 Class.forName(driver, true, ClassLoader.getSystemClassLoader());
31 } catch (Exception ex) {
32 println("DriverManager.Initialize: load failed: " + ex);
33 }
34 }
35 }
sun.security.action.GetPropertyAction() hasn't been publiced.actually and exactly,it's not be doced,which reflects that sun doesn't surport us to use these class or method which is lower class,usually, we use the classes api tells us is proier and maybe has called these undoc class but usually for us ,it's not necessary.so in the program of us or even others ,we could and i think it's really better for us to
neglect them which u can find out in the jar file of rt.jar.
posted @
2007-04-11 16:35 wqwqwqwqwq 閱讀(564) |
評論 (0) |
編輯 收藏
摘要: 可供程序利用的資源(內存、CPU時間、網絡帶寬等)是有限的,優(yōu)化的目的就是讓程序用盡可能少的資源完成預定的任務。優(yōu)化通常包含兩方面的內容:減小代碼的體積,提高代碼的運行效率。本文討論的主要是如何提高代碼的效率。
閱讀全文
posted @
2007-04-09 11:12 wqwqwqwqwq 閱讀(472) |
評論 (0) |
編輯 收藏
1.變量引用的時候,空指針情況的防止,即為空檢查.
2.數(shù)學運算異常,如除0的情況.數(shù)組越界異常,字符串訪問過界
3.數(shù)據庫檢索記錄,結果記錄行數(shù)狀況的處理.
4.畫面顯示項目的確認.
5.畫面顯示項目達到上限時情況的處理.
6.系統(tǒng)出錯的時候,異常信息是否正確.
7.數(shù)據庫連接,游標的處理.
8.數(shù)學運算時,數(shù)據精度的處理.
posted @
2007-04-09 11:06 wqwqwqwqwq 閱讀(219) |
評論 (0) |
編輯 收藏