Linux下安装JDK并配置环境变量
1. 查询是否默认安装有JDK [root@localhost bin]# java -version java version 1.6.0_22 OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.41.1.10.4.el6-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) 2. 删除默认的安装的OpenJdk [root@localhost bin]# rpm -qa | grep jdk java-1.6.0-op