Is it possible to force garbage collection in Java, even if it is tricky to do? I know about System.gc(); and Runtime.gc(); but they only suggest t
System.gc();
Runtime.gc();
You can trigger a GC from the command line. This is useful for batch/crontab:
jdk1.7.0/bin/jcmd GC.run
See :