Making Java work in browsers on Mac OSX Lion
So I updated to OSX Lion 10.7. Very cool, especially with the easy gestures.
Biggest problem: my bank website, which uses Java applets for secure logins, stopped working. In the area where the login form should have been I saw a message that said: "Inactive Plug-in". Same problem across Firefox, Safari, Chrome — all updated to their latest versions.
I installed the latest Java for OSX Lion from the Apple website. In hindsight, this was not necessary as the "Software Update" from the Apple menu, as usual, takes care of everything including updating the latest Java.
So the problem was clearly not with the browsers. The listing of plugins in Firefox showed me that "Java Applet Plugin" is in fact active.
The problem was annoyingly simple: the update to OSX Lion 10.7 and above often (not always, apparently) disables Java inside browsers for some odd security reason.
All I had to do was go into "Java Preferences" and enable this back again. Apple hasn't made it easy, but it's a simple command in Terminal:
/Applications/Utilities/Java\ Preferences.app/Contents/MacOS/Java\ Preferences
This will bring up a window as in the screenshot below. Just enable the bit that says to allow applets in browsers, and you're all set. (It will work when you restart your browser.)
(Edit: You can also search in Spotlight for "Java Preferences".)