嵌入式媒體的開發,大多要用到各種開源的東西,
如果要上android等架構,調試的前提往往是必須安裝eclips等共具,本文介紹在沒有網路條件下,如何手動安裝elips到ubuntu:
1 下載eclips:
http://www.eclipse.org/downloads/
這裡我們選擇c,c++包下載,下載後安裝如下步驟:
0down vote |
You can simply download the .tar.gz package from the eclipse website http://eclipse.org/downloads/?osType=linux , extract the package... then change the authorization of the file named eclipse by running the command $ chmod 777 eclipse
then everytime you want the IDE to run, just enter into the directory where the IDE is extracted by terminal and type.... $ ./eclipse
done... |
當然,安裝後可能會有如下問題:
about_files artifacts.xml dropins eclipse.ini features libcairo-swt.so p2 readme
about.html configuration eclipse epl-v10.html icon.xpm notice.html plugins
root@ubuntu:/eclipse/eclipse# chmod 777 eclipse
root@ubuntu:/eclipse/eclipse# ./eclipse
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/eclipse/eclipse/jre/bin/java
java in your current PATH
原因是你還必須有java的虛擬機器環境
2 java vm 的安裝
:http://www.oracle.com/technetwork/java/javase/overview/index.html
這是要註冊的,寫很多東西,甲骨文不僅僅是資料庫牛逼,逼人寫資訊也牛逼。。。。據稱他們的收費也是第一
所以:如下地址也許更好:http://code.google.com/p/autosetup1/downloads/detail?name=jdk-6u20-linux-i586.bin&can=2&q=
拿到包以後安裝:
2.1 root@ubuntu:/jdk# sudo chmod a+x jdk-6u20-linux-i586.bin
2.2 root@ubuntu:/jdk# ./jdk-6u20-linux-i586.bin
彈出:
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
。。。 。。。
連續按斷行符號直到顯示要求輸入yes/no,
Please enter "yes" or "no".
Do you agree to the above license terms? [yes or no]
yes
此時輸入yes並斷行符號,將會得到jdk1.6.0_20目錄。
ok,jdk已安裝完畢
root@ubuntu:/jdk# java -version
The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* gcj-4.5-jre-headless
* openjdk-6-jre-headless
Try: apt-get install <selected package>
這樣還不行 因為eclipse還找不到你的java,
你還需要做如下配置
1 然後配置環境變數~/.bashrc,在最後添加:
export JAVA_HOME=<jdk install dir>
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
2 建立軟連結:$ cd <eclipse dir>
$ ln -sf $JRE_HOME jre
目的是在eclipse安裝目錄下建立一個名稱為jre的連結,將其指向java安裝目錄下的jre目錄
再運行root@ubuntu:/eclipse/eclipse# ./eclipse就可以順利起來你要的eclipse的IDE介面了
ref: 1
http://blog.csdn.net/luyaowei/article/details/5608974
ref 2
http://blog.csdn.net/jokes000/article/details/7548437
本帖原創: by huang.makin@gmail.com