1. 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; loading a first value into each of the memory pages of the Java balloon object, the loading being performed by the Java balloon agent; detecting by the virtualization software machine physical memory pages having the first value; and reclaiming the detected machine physical memory pages by the virtualization software.