Oracle announced the official release of the JDK for Java SE 7 Update 4 on Mac OS X (Lion), as of 2012-04-26. No more need for the tricks discussed on this page.
Installation is simple per these instructions:
  1. Download from the usual place on the Oracle web site.
  2. Mount the DMG.
  3. Run the installer.
This release has a few limitations, most notably the lack of support for Web Start and the Java Plugin for web browsers. That support is expected later this year.
After installing, read the JDK for Mac ReadMe. Most importantly, if you want Java 7 to be the default, drag it to the top of the list in the Java Preferences app found in your Utilities folder.
Mac OS X easily supports multiple JVMs simultaneously. Each is now found here:
This geek gets a thrill seeing Mac OS X listed as a "Certified System Configuration".
By the way, Apple provides a mailing list for developers’ technical issues related to Java on OS X.


No need to adjust memory configuration when installing Postgres on Mac

EnterpriseDB.com is kind enough to provide the Mac OS X installer for Postgres.  Using that installer is even easier that it seems.

The last few versions such as 9.1 come bundled with a ReadMe that is misleading. The ReadMe states that you need to adjust your shared memory configuration. Actually, the installer does this for you.

[1] Download and run the installer.

[2] Read the following message displayed by the installer.

[3] Restart your Mac.

The installer installs some script to automatically launch the Postgres engine when your Mac starts.

[4] Run the installer again to complete the installation process.

I am recording here the last last sentence in that message, for future reference:
If you wish to restore the default [memory configuration] settings in the future, simply delete the /etc/sysctl.conf and reboot.