I faced the same problem on my MacBook .
And after changed the VM , I could install the GlassFish v2ur2.
NG version:
> ./java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
OK version
> java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)
[Message sent by forum member 'tyoshio2002' (tyoshio2002)]
http://forums.java.net/jive/thread.jspa?messageID=277165