Unable to create the selected preference page.
org/apache/hadoop/eclipse/preferences/MapReducePreferencePage : Unsupported major.minor version 51.0
PATH=$PATH:/usr/java/jdk1.7.0_55-cloudera/bin:/opt/cloudy/bin
export JAVA_HOME=/usr/java/jdk1.7.0_55-cloudera
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
需要把java版本切换成1.7 (可以用java-version检测下切换成功没)
此时如果切换不成功 应该是linux系统本身自带的java版本影响需要把他删除
下面是别人博客找到能用来删除旧版 java JDK的方法(转)
当成功把jdk1.6安装到 /usr/java,并且配置好了系统环境变量
执行 # java -version 时显示的不是你安装的jdk版本,而是其它版本如jdk1.4.2,是因为linux系统有默认的jdk,版本为1.4.2;
- [root@ip-10-0-0-54 lib]# java -version
- java version "1.4.2"
- gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-44)
- Copyright (C) 2006 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
切换默认jdk版本执行
1.
- # cd /usr/bin
- # ln -s -f /usr/java/jdk1.6.0_24/jre/bin/java
- # ln -s -f /usr/java/jdk1.6.0_24/bin/javac
2. Remove the old empty java environment
- # rm -f /usr/bin/java
- # rm -f /usr/bin/javac
- # rm -f /etc/alternatives/java
- # rm -f /etc/alternatives/javac)
如果执行完1,查看 /usr/bin下的java properties,如果已经修改过来了,则步骤2不必再执行,命令行输入
# java –version
则可以看到jdk版本已经正常
- java version "1.6.0_24"
- Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
- Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)