Java – Installing Java on OS X 10.9 (Mavericks)

javamacos

I have installed the JDK on Mac OS X v10.8 (Mountain Lion). When I upgraded it to Mac OS X v10.9 (Mavericks) and ran java -version in the terminal, it showed:

No Java runtime present, requesting install.

Then I manually installed the JDK (1.7) on my Mac. It seems that the installation worked fine. When the installation was done, I opened the terminal and typed java -version as well. It also showed the same error:

No Java runtime present, requesting install.

How can I solve this problem?

Best Answer

The new Mavericks (10.9) showed me the "Requesting install", but nothing happened.

The solution was to manually download and install the official Java package for OS X, which is in Java for OS X 2013-005.

Update: As mentioned in the comments below, there is a newer version of this same package:

Java for OS X 2014-001

Java for OS X 2014-001 (Correcting dead line above)

Java for OS X 2014-001 includes installation improvements, and supersedes all previous versions of Java for OS X. This package installs the same version of Java 6 included in Java for OS X 2013-005.