Can I force a running Java application to Garbage Collect from console ?
Just to preempt some replies:
- I know I can do it with JVisualVM but I only have console access not
X-Windows access - I know System.gc() only requests garbage collection it doesnt force
it, but thats seem to 3. work, so Im looking for a way of calling
that externaly. - I know you shouldn’t garbage collect a working application, I’m doing
this as part of a process of checking for a potential memory leak.’ - The application is runinng in production I cannot modify its
envrionment, jvm ecetera
JVisualVM can connect to remote processes if
So you don’t need to be in an xWindows environment on the same machine to make the magic happen…
Example or parameters to pass to java