So I am looking at a heap with jmap on a remote box and I want to force garbage collection on it. How do you do this without popping into jvisualvm or jconsole and friends?<
If you run jmap -histo:live , that will force a full GC on the heap before it prints anything out.
jmap -histo:live