Mac terminal command to disable Java update prompts


If you’re using Munki to manage Java updates, even if you’re running Autopkg frequently (maybe once or twice a day), it’s possible your users may get a Java update notification when launching Java.

In other words, you could have Autopkg run the OracleJava8 recipe at 10:00 AM, your user could launch up a Java-based program at 10:05 AM, and your user’s Managed Software Center may not check in with the Munki server until 11:00 AM. At 10:05 AM, you probably don’t want your user to see this:

javaupdateprompt
So if you want the prompt not to appear, run this command:

#!/bin/bash
sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false

If you’re trying to make this Munki-able, you can use this .mobileconfig profile, which imports into Munki. Alternatively, you can use this pkgsinfo .plist and put it directly into your Munki repository’s pkgsinfo folder (and then run makecatalogs).


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.