Builds failing after upgrading to Java7, Missing Tools.jar and bad class versions

后端 未结 8 1699
滥情空心
滥情空心 2020-12-08 17:55

I recently upgraded to Java7 on my Macbook Pro. I downloaded the JDK (not the JRE).

» javac version
javac 1.7.0_17

» echo $JAVA_HOME    
/Library/Java/Java         


        
相关标签:
8条回答
  • 2020-12-08 18:35

    I had a similar issue and found the answer in another thread:

    Symbolic link messed up on OSX while trying to change the Java version

    I set JAVA_HOME as follows:

    export JAVA_HOME=/Library/Java/Home
    

    and it's working now.

    0 讨论(0)
  • 2020-12-08 18:36

    If you find that the tools.jar in /Library/Java/Extensions is not from the right version of the JDK, then move it out of the way, so that there is no tools.jar there and there is a tools.jar in $JAVA_HOME/lib (as set in the previous response).

    eg

    cd 
    sudo mv /Library/Java/Extensions/tools.jar tools.jar.safe
    
    0 讨论(0)
提交回复
热议问题