The Sun One Studio 4, Community Edition installer doesn't work, even when using suggestions from Sun (at least for me it didn't). To get around this problem, I have created a Mac OS X friendly installer package. The installer installs the necessary files and an AppleScript that runs the application. Hopefully Sun will include Mac OS X in their "supported systems" in the future.
[Editor's note: I have not tested this installer package myself, but I thought others who do work in Java may find the installer package useful. If you have feedback on how the installer worked for you, please add it in the comments.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021028061722388