1. A non-transitory computer readable medium comprising instructions, which when executed in a computer system, causes the computer system to carry out a method for managing memory in a host having virtualization software that supports execution of a virtual machine (VM) having a guest operating system that manages allocation of guest physical memory, a balloon driver installed in the guest operating system, and a Java Virtual Machine (JVM) executing as an application on top of the guest operating system and having a heap memory allocated from the guest physical memory, the method comprising: at the balloon driver, receiving a request from the virtualization software for memory pages and communicating a target number of memory pages to a Java balloon agent; allocating, by the Java balloon agent, a Java balloon object in the heap memory of the JVM, the Java balloon agent executing as a Java thread in the JVM, the Java balloon object being allocated a number of memory pages equal to the target number of memory pages; obtaining, by the Java balloon agent, a virtual address of the Java balloon object; identifying a physical page number corresponding to the virtual address; sending the physical page number to the virtualization software; and reclaiming a machine physical memory page associated with the physical page number by the virtualization software.