發表文章

目前顯示的是 8月, 2008的文章

如何在linux平台升級java step by step

圖片
(不知道該用"linux"這個詞還是該講"ubuntu",因為首次接觸linux平台就是ubuntu,處在裡面久了也習慣了用ubuntu這個詞。這轉變有點像search => google 這樣的演化。) 方法一:apt 基本上在ubuntu上只要用apt就可以幫忙安裝軟體。先更新軟體列表,再找尋要安裝的某軟體。 sudo apt-get update apt-cache search java jdk 其中sudo提高使用者的權限,對系統的資訊作些修改。而apt-cache search 由於只是要作搜尋,所以不需要加sudo。 經過以上的指令,會列出包含有"java"以及"jdk"這兩個關鍵詞的軟體。 正宗當然是sun java : sun-java5-jdk - Sun Java(TM) Development Kit (JDK) 5.0 sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6 接著就看要用哪一個版本 -- sudo apt-get install sun-java5-jdk -- 方法二:下載bin檔 如果要下載最最最新的!那當然要跑道官方網頁抓。 http://java.sun.com/j2se/downloads.html 手動安裝jdk需要以下過程; 1. 下載jdk。 目前最新# self-extracting JDK file jdk-6u10-rc-bin-b28-linux-i586-21_jul_2008.bin, 76.16 MB (MD5 Checksum) 2. 複製檔案到 /usr/local 並修改檔案屬性 (chmod +x)。 3. 建立link; ln -s /usr/java/j2sdk1.6.1_10/bin/java /usr/bin/java 4. 要設定JAVA_HOME以及CLASS_PATH 方法三:下載rpm檔 而java官方網頁也有提供rpm的封包, 目前最新# RPM in self-extracting JDK file jdk-6u10-rc-bin-b28-linux-i586-21_jul_2008-rpm.bin, 72.13 MB

Upgrading the android sdk

圖片
先來看看google 對於android sdk開發環境的說明。 System and Software Requirements http://code.google.com/android/intro/installing.html Supported Operating Systems: * Windows XP or Vista * Mac OS X 10.4.8 or later (x86 only) * Linux (tested on Linux Ubuntu Dapper Drake) Supported Development Environments: * Eclipse IDE o Eclipse 3.3 (Europa), 3.4 (Ganymede) + Eclipse JDT plugin (included in most Eclipse IDE packages) + WST (optional, but needed for the Android Editors feature; included in most Eclipse IDE packages) o JDK 5 or JDK 6 (JRE alone is not sufficient) o Android Development Tools plugin (optional) o Not compatible with Gnu Compiler for Java (gcj) * Other development environments or IDEs o JDK 5 or JDK 6 (JRE alone is not sufficient) o Apache Ant 1.6.5 or later for Linux and Mac, 1.7 or later for Windows o Not compatible with Gnu Compiler for Java (gcj) 以上粗體的部份,就是在linux上面開發要注意的問題,囧 需要自己抓一份jd

Android 0.9 SDK beta (r1) 發佈嚕:)

圖片
Android 0.9 SDK beta 發佈嚕:) 可以在以下連結下載 http://code.google.com/android/download.html window平台上前一個版本sdk是 android-sdk_m5-rc15_windows 最新版是: android-sdk-windows-0.9_beta (r1) 兩者的差異可以看releasenotes http://code.google.com/android/RELEASENOTES.html 目前最新建議的開發環境: Eclipse 3.4 (Ganymede) 需搭配 plugin ADT-0.7.1 (ADT, Android Development Tools) 個人測試過後,發現還是全都用新的吧。 之前遇到一個窘境,一開始我用 Eclipse 3.3 (Europa)開發, 然後用android-sdk_m5-rc15_windows 先是發現ADT更新,就傻傻的跟著更新,結果更新了ADT Eclispe回應說要更新sdk,就也跟著抓了新的sdk,發現無法正確啟動模擬器。 想說明明就只是跟著更新而已怎麼會錯呢,結果想要調整回m5-rc15的時候 Eclipse說m5-rc15不適用現在的ADT,把ADT換回前一個版本,照理說環境應該已經跟之前一樣了,舊的sdk舊的ADT,想不到Eclipse回應說需要更新ADT !! 於是就陷入了窘境:更新了ADT就要更新sdk,更新了sdk跑不動,想換回舊環境也不行。 接著就心一橫直接衝 Eclipse 3.4 (Ganymede) + ADT-0.7.1 + android-sdk-windows-0.9_beta 才又可以正常的開發 Orz 以上是window平台上開發android上的故事,在linux上又是另外個故事了 Orz Eclipse 相關文章: set Android error log on Eclipse linux(ubuntu)環境下開發 Android 所遇到的Eclipse 設定問題 Android tutorial : Before HelloWorld

GtkContainer 概念介紹

圖片
GtkContainer : "gtk_container_get_focus_vadjustment () GtkAdjustment* gtk_container_get_focus_vadjustment (GtkContainer *container); Retrieves the vertical focus adjustment for the container. See gtk_container_set_focus_vadjustment(). container : a GtkContainer Returns : the vertical focus adjustment, or NULL if none has been set. gtk_container_set_focus_vadjustment () void gtk_container_set_focus_vadjustment (GtkContainer *container, GtkAdjustment *adjustment); Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the vertical alignment. See gtk_scrolled_window_get_vadjustment() for a typical way of obtaining the adjustment and gtk_container_set_focus_hadjustment() for setting the horizontal adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allo

GTK中對於Key Values的解釋

GTK中對於Key Values的解釋 Key Values : "gdk_keymap_get_entries_for_keyval () gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap, guint keyval, GdkKeymapKey **keys, gint *n_keys); Obtains a list of keycode/group/level combinations that will generate keyval. Groups and levels are two kinds of keyboard mode; in general, the level determines whether the top or bottom symbol on a key is used, and the group determines whether the left or right symbol is used. On US keyboards, the shift key changes the keyboard level, and there are no groups. A group switch key might convert a keyboard between Hebrew to English modes, for example. GdkEventKey contains a group field that indicates the active keyboard group. The level is computed from the modifier mask. The returned array should be freed with g_free(). keymap : a GdkKeymap, or NULL to use the default keymap keyval : a keyval, such as GDK_a, GDK_Up, GDK_Return, etc. keys : return location for an array of GdkKeymapKey n_

Google

本月熱門文章

香港朋友,真的對唔住,台灣出了這種中共的幫兇!

堅持5個月!反送中示威者六大特色 6 features of Hong Kong Anti-ELAB Protesters│老外看香港│郝毅博 Ben Hedges│新唐人電視台

[黑金] 台南88槍擊案主犯國民黨學甲區黨部主委王文宗 也擔任統促黨幹部