You asked for an OpenJDK 7 build but your version is java version "1.7.0_72" Java(TM) SE

You asked for an OpenJDK 7 build but your version is
java version "1.7.0_72" Java(TM) SE Runtime Environment (build 1.7.0_72-b14) Java     HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode).
************************************************************
build/core/main.mk:191: *** stop. Stop.

#### make failed to build some targets  ####

问题解决办法:

 

 

Put the jdk_switch.sh in my ~ directory and run the following commands to switch jdk version:

$ . ./jdk_switch.sh jdk7
$ . ./jdk_switch.sh jdk6

The path of JDK are:

/usr/lib/jvm/java-6-oracle/
/usr/lib/jvm/java-7-openjdk-amd64/

The content of jdk_switch.sh:

#!/bin/bash
case $1 in
    jdk6)
 export JAVA_HOME=/usr/lib/jvm/java-6-oracle/
 ;;
    jdk7)
 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
 ;;
    *)
 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
 ;;
esac

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

java -version

OpenJDK 7 version is :

 

java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

In your case, exporting your PATH and CLASSPATH might helpful. Or just use a simple bash script. I hope this might help you.

 

 

你可能感兴趣的:(开发工具)