The following lines in the hbase-env.sh file shows how to set the JAVA_HOME environment variable (required for HBase) and set the heap to 4 GB (rather than the default value of 1 GB). If you copy and paste this example, be sure to adjust the JAVA_HOME to suit your environment.
The java implementation to use.
The maximum amount of heap to use. Default is left to JVM default.