Last active
November 17, 2021 13:10
-
-
Save otbe/7e31d92da86694231c1de6299bbefa82 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 JavaEnvironment { | |
| public static void main(String args[]) { | |
| System.out.println( | |
| "Number of available processors: " + Runtime.getRuntime().availableProcessors()); | |
| System.out.println("GCs:"); | |
| ManagementFactory | |
| .getGarbageCollectorMXBeans() | |
| .forEach(x -> System.out.println(x.getName())); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment