嵌入式媒体的开发,大多要用到各种开源的东西,如果要上android等框架,调试的前提往往是必须安装eclips等共具,本文介绍在没有网络条件下,如何手动安装elips到ubuntu:
1 下载eclips:
http://www.eclipse.org/downloads/
这里我们选择c,c++包下载,下载后安装如下步骤:
| 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/jreexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
2 建立软链接:
$ cd <eclipse dir>
$ ln -sf $JRE_HOME jre
目的是在eclipse安装目录下建立一个名称为jre的链接,将其指向java安装目录下的jre目录
就可以顺利起来你要的eclipse的IDE界面了