推荐看原文,五颜六色的更好看: (http://ajava.org/course/java/14991.html)
安装JDK
sudo apt-get install sun-java6-jdk 设置Java连接sudo update-alternatives --config java 配置 Java环境 sudo vim /etc/environmentCLASSPATH=/usr/lib/jvm/java-6-sun/lib JAVA_HOME=/usr/lib/jvm/java-6-sun 下载Eclipse解压eclipse-jee-galileo-linux-gtk.tar.gz到/opt目录
sudo tar zxvf eclipse-jee-galileo-linux-gtk.tar.gz -C /opt 把sun-java6-jdk设为系统默认 sudo update-java-alternatives -s java-6-sun 编辑JVM配置文件sudo vim /etc/jvm/usr/lib/jvm/java-6-sun 配置Eclipse的JAVA_HOMEsudo vim /etc/eclipse/java_home/usr/lib/jvm/java-6-sun 设置Eclipse的图标sudo gedit /usr/share/applications/eclipse.desktop [Desktop Entry]Name=EclipseExec=/opt/eclipse/eclipse -vmargs -Xms512M -Xmx1024M -Dsun.java2d.opengl=trueTerminal=falseType=ApplicationStartupNotify=trueIcon=/opt/eclipse/icon.xpmCategories=Development; 红色部分为文件内容,蓝色内容为命令