I recently upgraded to Lion on two of my Macs. Both were previously fully updated Snow Leopard installs. Once Lion was installed I then fired up a web page that required Java, and on both machines Java was downloaded and installed without error. The applet that was trying to run requires 32-bit Java. On both machines, I used the Java Preferences app to switch the priority to 32-bit Java first. On machine A, everything works as expected - running java -version returns "Java HotSpot(TM) Client VM (build 20.1-b02-383, mixed mode)". If I switch to 64-bit Java as the first preference, I get "Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)". This is also the case on machine B. However, if I navigate to http://java.com/en/download/testjava.jsp I get discrepancies.
On machine A, the Architecture is reported correctly as i386 when 32-bit Java is the top priority. However, machine B always reports x86_64, regardless of the order in the preferences app. The behavior is consistent between Chrome, Firefox and Safari. Further, I've tried running Safari in 32-bit mode, but the Java architecture is still x86_64 (and I can verify that it's actually the 64-bit mode as the applet errors with a very specific error message).
Repairing permissions and reinstalling Java (as well as rebooting, etc) hasn't solved anything.
At this point, I'd normally write this up as "time to do a fresh re-install," but since I'm still trying to learn the various inner workings of Macs, I'd like to try to resolve this one.