2011年3月30日 星期三

ubuntu 10.10上安裝jdk 1.5

sudo apt-get install sun-java5-jdk
執行完會出現unable to locate......錯誤訊息
似乎是1.5版在server被移掉了?
找到解法:

1- Open /etc/apt/sources.list with a text editor like gedit:
sudo gedit /etc/apt/sources.list

2- Add the following lines to the end of the file then save it and close:
## For sun-java5-jdk
deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse

3- Update the packages lists and install sun-java5-jdk:
sudo aptitude update
sudo aptitude install sun-java5-jdk

安裝完成之後再使用
update-alternative --config java
update-alternative --config javac
選擇java版本即可

2011年3月1日 星期二

[android相關] adb devices顯示no permission

[root@localhost tools]# sudo ./adb kill-server
[root@localhost tools]# sudo ./adb start-server
* daemon not running. starting it now *
* daemon started successfully *
然後執行adb devices應該就行了

重點是要先把eclipse關掉再執行
eclipse在發現adb server不見後似乎會重啟
而由eclipse啟動的server不一定有權限