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?<
Since JDK 7 you can use the JDK command tool 'jcmd' such as:
jcmd GC.run