Here you can find the source of logJavaProperties(Logger log)
public static void logJavaProperties(Logger log)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Sonatype, Inc.//from w ww. j a v a 2s .co m * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Sonatype, Inc. - initial API and implementation *******************************************************************************/ import java.util.Properties; import java.util.SortedMap; import java.util.TreeMap; import org.slf4j.Logger; public class Main { public static void logJavaProperties(Logger log) { Properties javaProperties = System.getProperties(); SortedMap<String, String> sortedProperties = new TreeMap<String, String>(); for (String key : javaProperties.stringPropertyNames()) { sortedProperties.put(key, javaProperties.getProperty(key)); } log.debug("Java properties (ordered by property name):"); //$NON-NLS-1$ for (String key : sortedProperties.keySet()) { log.debug(" {}={}", key, sortedProperties.get(key)); } } }