On my mac os 10.6.6 I'm trying to persist env variable $JAVA_HOME but it doesn't stick!
$ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Once I restart it won't be set anymore. The GUI way to do that is to use the Property List Editor as documented by Apple and on SOSO. However, after a restart:
$ echo $JAVA_HOME
$