一、JDK的配置
1.首先卸载默认的jdk1.42
rpm -qa | grep gcj ← 确认gcj的版本号
libgcj-devel-3.4.6-3
java-1.4.2-gcj-compat-1.4.2.0-27jpp ← 根据版本号卸载gcj
libgcj-3.4.6-3
# yum -y remove java-1.4.2-gcj-compat
2.从oracle 官网下载jdk-6u32-linux-i586-rpm.bin 放在了 /usr/java下。解压缩至当前文件夹
3.配置JAVA_HOME
<1># vim /etc/profile
<2>在profile最后加入以下几行,切记文件末尾:
export JAVA_HOME=/usr/java/jdk1.6.0_32
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
<3># reboot 重启机器配置生效
<4>在控制台执行java -version 查看配置是否正确
二、Eclipse 环境的配置
1. Eclipse 下载地址 http://www.eclipse.org/downloads/?osType=linux
2. 对/opt/eclipse下的所有文件添加读许可
# chmod -R +r /opt/eclipse
3. 在/usr/bin创建 Eclipse的执行权限路径
# touch /usr/bin/eclipse
# chmod 755 /usr/bin/eclipse
4. 使用你偏好的文件编辑器打开eclipse文件
# nano -w /usr/bin/eclipse //同 vi /usr/bin/eclipse
## 黏贴以下内容到文件 ##
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse$*
挂载报错
umount: /mnt/cdrom: device is busy
卸载目录时,当前位置不能处于要卸载的目录,否则卸载不成功)
Every wonder why sometimes you get this message when you try to un-mount a NFS drive or cdrom drive (不能卸载的情形)
CODE
root@homer:~# umount /mnt/cdrom
umount: /mnt/cdrom: device is busy
umount: /mnt/cdrom: device is busy
root@homer:~#
Well chances a process is running that is using that directory. To find out run (有关的运行的进程)
CODE
root@homer:~# fuser -m /mnt/cdrom/
/mnt/cdrom/: 24066c
That shows you what process is using that directory. Now lets do a ps aux and see whats running (查看哪个进程使用了这个目录)
CODE
root@homer:~# ps aux | grep 24066
root 24066 0.0 0.5 2244 1284 pts/10 S 14:04 0:00 -su
root@homer:~#
Looks like a the root user is in that directory. If you cannot find the term that is in that directory then kill that process(杀死进程)
CODE
root@homer:~# kill -9 24066
root@homer:~#
now you can un-mount (可以卸载)
CODE
root@homer:~# umount /mnt/cdrom/
root@homer:~#
This tip brought to you by the letter J and the letter Y
http://www.cnblogs.com/ac-carrot/archive/2012/05/23/2514586.html
http://tan.bai.blog.163.com/blog/static/38603952201071481824712/