Post JSE 5 ergonomics is intended to automatically select the appropriate type of garbage collector for you (among other things).
I would like to know if there is an
Here's some info about how to programmatically get GC info, but it looks like it may need the name of the GC beforehand. Troublesome.
Edit: try ManagementFactory.getGarbageCollectorMXBeans() and iterate through the returned list. One of these will be active.
ManagementFactory.getGarbageCollectorMXBeans()