how could I request Java garbage collection externally, starting the program from JAR (Windows BAT used)?
System.gc(
You normally should not have any reason to force garbage collection. Doing so, messes up the garbage collector algorithms (mainly their performance). It will also slow down the program while garbage is being collected. If there is a memory issue, you should use memory tracing tools to find out where references are being held? (Are listeners unregistered?)
As in the other answers, you can use jconsole or jvisualvm. You can also use jmx to do it programmatically.