Fixing Java on OS X 10.10 Yosemite

After upgrading to Yosemite, I was unable to run Apache Solr as it could not find a version of Java installed.

$java -version

No Java runtime present, requesting install.

I downloaded and installed the latest version of Java 8, but that didn’t work. I removed it and downloaded the latest version of Java 7.  Still no dice.

After a bit of digging around, I found a reference to installing Java for OS X 2014-001. While this is Java 6, it fixed my issue and allowed me to start Solr.

4 responses to “Fixing Java on OS X 10.10 Yosemite”

  1. Adam says:

    Same problem. I pointed my PATH at Java 8 from my ~/.bashrc with

    JAVA_HOME=”/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home”
    PATH=$JAVA_HOME/bin:$PATH

    Cleared things up for me.

  2. Rob Wierzbowski says:

    I found that on 10.10 some things didn’t see the Java 8 runtime, but they do see the SDK.

    Try the Java 8 SDK. Probably safer than an old Java 6 runtime.

  3. MiguelB says:

    I changed the JRE by the JDK (jdk-8u25-x64-macosx). Everything is working fine now.

  4. me says:

    Better:

    export JAVA_HOME=”$(/usr/libexec/java_home)”

    See also:

    /usr/libexec/java_home –help

Leave a Reply