Java has plenty of real-world applications and uses, but because it has been used as an attack vector in the past, Apple has made OS X reasonably aggressive in limiting Java on Macs. As a result, Mavericks does not come with Java preinstalled, and upgraded Macs will remove Java in Mavericks installation process.
For most users this is a very good thing, it further reduces the unlikely event of a trojan or something nefarious being installed on Macs, and many Mac users won’t notice Java missing at all. On the other hand, many of us do need Java installed in OS X.
Many common applications use Java, ranging from the excellent cloud backup service CrashPlan, to the Eclipse IDE, and even some online banking and financial services, and without installing Java yourself in Mavericks you’ll find these apps and websites simply don’t work. Fortunately it’s a simple fix, and you can go about installing Java on OS X Mavericks in several different ways.
Option 1: Install Java in Mavericks through the Command Line
Installing Java through the command line is perhaps the easiest. All you need to do is launch Terminal, found in /Applications/Utilities/, and enter the following command:
Assuming Java is not on the Mac already, this command will trigger a popup that says something along the lines of “To open Java, you need a Java SE runtime. Would you like to install one now?” – click “Install” when asked to begin the simple process.
If you got lines something like “To use the “java,” command-line tool you need to install a JDK.”, you need to get manual download and install. Go to option 2.
From here on it’s just like installing any other package. Remember, you will probably need to relaunch certain apps that are Java dependent to get them working again, including web browsers if it’s a website you are attempting to access that requires a Java applet to run.
If you run that command and already have Java installed, you’ll simply see the currently installed Java version instead, like so:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-465, mixed mode)
If you’re not a fan of the command line, or would rather get the latest version of Java installed in OS X 10.9 directly from Oracle, that’s what we’ll cover next.
Option 2: Installing the Latest Java Version from Oracle
The other option to get the latest version of Java is to simply download it from Oracle and install manually.
Most casual Mac users only need to get the JRE (Java Runtime Environment) and not the full JDK (Java Development Kit).
Downloading directly from Oracles website insures the latest version will be installed, and it also has the advantage of allowing for remote installation and upgrades on Macs through Remote Login or SSH.
OS X handles Java well these days, and and newer versions of Safari even let you allow the Java plugin on a per website basis, further limiting it’s potential problems.
Remember, for most Mavericks users, you can avoid Java and not worry about it. Installing Java is really only necessary if a crucial application or web service requires it.