make compatible with apple java 1.6
note that mac memory allocation is low