ReferenceError: java is not defined - Mac OS X - Firefox 4, 5, 6, 7+
For grabbing screenshots we often use iOpus' wonderful Firefox plugin iMacros. Today I opened an old macro and it failed to run. It turns out that it uses the global java object (via LiveConnect) to read and write files, and the global java object was no longer available.
Other error message you may see include, "ReferenceError: java is not defined (Error code: 991)" from iMacros, or simply "ReferenceError: java is not defined" from Firebug or the browser itself.
The simple solution is to check "Enable applet plug-in and Web Start applications" in the Java Preferences app. Use spotlight to find it.
Then restart Firefox and try to run the macro again and it should work. If you're using Firebug, you can easily test to see if it's installed correctly by typing "java" into the console. If installed you should see "[Java Package "java"]" as output.Theories why this happened? Most likely it's because Java for browsers is disabled by default in Mac OS X Lion, so I only noticed this after I upgrade from Snow Leopard.
Another source that confirms my suspicion:
http://sniptools.com/mac-osx/making-java-work-in-browsers-on-mac-osx-lion
