Created
April 27, 2012 07:01
-
-
Save jyukutyo/2506746 to your computer and use it in GitHub Desktop.
どのGCが使われているか表示する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.management.*; | |
import java.util.List; | |
public class GC { | |
public static void main(String args[]) { | |
List<GarbageCollectorMXBean> l = ManagementFactory.getGarbageCollectorMXBeans(); | |
for (GarbageCollectorMXBean b : l) { | |
System.out.println(b.getName()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment