4 Replies Latest reply: May 27, 2012 7:59 AM by MrHoffman
doug fromoz Level 1 (0 points)

How can I force disabling of the Java web plugin each time I reboot or login?


http://support.apple.com/kb/HT5242 says that after the most recent(Apr 2012) security update "If the Java web plug-in detects that no applets have been run for an extended period of time it will again disable Java applets."

But I notice that if I switch the Java plugin in Safari on and forget to switch it back off again after use, it takes at least a few days (maybe more) for OSX to switch it off automatically. So I'd like to shorten the wait period, or ideally each time I reboot or login.


TIA, Doug.

I've used cron on BSD systems (many moons ago), BTW, if that's what it takes, though I was hoping there's a nice higher-level facility I can use.

MacBook, Mac OS X (10.5.7)
  • MrHoffman Level 6 (14,750 points)

    Not entirely sure what you want, but if you're looking for the "shut Java off" path within Safari, it's:


    Safari > Preferences > Security > uncheck Enable Java


    If you're looking to automate that sequence, that's probably an AppleScript away.

  • Jeffrey Jones2 Level 6 (8,615 points)

    I assume you are using Lion and not "10.5.7" indicated at the bottom of your message?


    For what it's worth, here is what I do. I have a Java applet that I use maybe a few time a week. Before opening the applet, I open Java Preferences (/Applications/Utilities/Java Preferences.app) and tick the "Enable applet plug-in…" box. Then I run the applet. Then I untick the box. I don't forget, because I leave Java Preferences open until I am finished. No need to restart Safari or anything.

  • doug fromoz Level 1 (0 points)

    Thanks JJ2 & MrH, though I was already using that Safari plug-in toggle.


    My problem is forgetting to switch it back off once I've needed to use the Java plug-in for some task. I use "control+option+command+eject" to go straight to shutdown in a single step (a life-style decision:), so even if I've got the Java Preferences open it doesn't help me. So I was wondering if there's a "Start Up task list" somewhere on Lion (thanks for the prompt about my silly OSX version number, MrH) where I can insert a simple script to toggle it back to "off" upon start up.

  • MrHoffman Level 6 (14,750 points)

    Using information from this Java web plug-in article (read all the comments there, for the details and updates, and for the warning about the quotes characters "fun" lurking there) and the login items for your user (System Preferences > Users & Groups > Login Items) and a little custom coding can probably get you to where you want.


    That particular script describes how to enable Java, and you're aiming to disable it; there'll be some tweaks needed.


    And FWIW, it was Jeffrey Jones2 that pointed to the version number; not me.  That particular bit of data is retrieved from your settings here in the forums.