How to view the memory used by the JVM?

Use the Runtime class to get the total/free memory used by the JVM,

Runtime.getRuntime().totalMemory();
Runtime.getRuntime().freeMemory();



About this entry