I sometimes find the Java setup on my various Apple devices to be a mystery.
Recently, I was trying to get a Java applet to run in the same way on 2 iMacs and my MacBook Air. The applet is a simple vpn client from Juniper that lets me access a Citrix Desktop from any Mac that I can install the Citrix receiver client on so I can work on 'Company stuff' from a large screen iMac when I'm sat at home or from my MacBook when I'm on the road (it works fine over 3/4G).
The first thing is that you have to do some configuring of both Java and Safari to get the applet to run at all.
Once that was all done, I could log in from all my Macs, fire up the applet and establish a secure connection.
On two of the Macs, as soon as I fired up the Citrix app, the Java vpn window would show 'error'. The console showed a Java crash. But on the third Mac, everything worked fine. I made sure that the Safari and Java preferences were set the same on each machine but still no joy. Then I remembered that I had done some Java development in the past and installed various jdks from Oracle so I ran:
java version "1.6.0_65"
sudo rm -fr /Library/Java/JavaVirtualMachines/*
Mac OS X Hints