Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
878
150
I just ran which java command and got the output /usr/bin/java

I also executed java -version command and also got version information output. So I believe that there is an actual java executable and not just a placeholder kind of thing. I may have installed it at some point, but I cannot remember doing that. Or does it comes pre-installed with the macOS Mojave?

If it doesn't come pre-installed, how do I get rid of it?
 
Yes and no.
There is java support software (tools) included (pre-installed), but there is no java runtime (to actually use java apps, etc) until you need it, or choose to install it yourself.
If you believe that you want to completely remove Java from your Mac - uninstall steps here
Be sure to read the instructions about not removing the Java tools from your usr/bin folder. Those tools are part of the macOS system software, and would reinstall the next time you get a system update. You can safely leave those file alone.
 
I did a clean install of Mojave, and it appears to have installed a Java framework (symbolic link). I am assuming this is required for proper functioning of the 10.14 OS.

I have not installed a JRE, or other Java packages (JDK or Java SE, as in from Oracle). Just yesterday an older program wanted to install it, so I found another way to accomplish what I wanted to do.

IMHO, if you believe this to be something you don't want you can try and remove with appropriate sudo commands. Be sure to keep a full and current backup on a separate disk.
 
I did a clean install of Mojave, and it appears to have installed a Java framework (symbolic link). I am assuming this is required for proper functioning of the 10.14 OS.

I have not installed a JRE, or other Java packages (JDK or Java SE, as in from Oracle). Just yesterday an older program wanted to install it, so I found another way to accomplish what I wanted to do.

IMHO, if you believe this to be something you don't want you can try and remove with appropriate sudo commands. Be sure to keep a full and current backup on a separate disk.
Java is not included in macOS anymore. If you attempt to run Java without it having been manually installed, you'll see this in terminal:
Code:
No Java runtime present, requesting install.
And then you'll get a GUI prompt telling you that in order to use Java you need to install a JDK. If you click the more info button, you're taken here: https://www.oracle.com/technetwork/java/javase/downloads/index.html
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.