Created
April 8, 2014 13:33
-
-
Save asmaier/10124772 to your computer and use it in GitHub Desktop.
Small java program showing a sorted list of all java system properties. Useful for debugging, e.g. encoding issues. Compile and run with "javac ShowSystemProperties.java; java ShowSystemProperties".
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.util.Map; | |
import java.util.Properties; | |
import java.util.TreeMap; | |
/** | |
* Shows a sorted list of all system properties | |
*/ | |
public class ShowSystemProperties { | |
public static void main(String[] argv) { | |
Properties props = System.getProperties(); | |
Map<Object,Object> sorted = new TreeMap<>(props); | |
for(Map.Entry<Object,Object> e : sorted.entrySet()) { | |
System.out.println(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment