Changeset 5db67f1


Ignore:
Timestamp:
Apr 23, 2019 1:24:03 PM (15 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6f86522
Parents:
21504f15
Message:

Util: Dump system properties in SystemVersion?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/SystemVersion.java

    r21504f15 r5db67f1  
    77import java.lang.reflect.Field;
    88import java.util.TimeZone;
     9import java.util.TreeSet;
    910
    1011import net.i2p.I2PAppContext;
     
    359360        System.out.println("x86      : " + isX86());
    360361        System.out.println("Zero JVM : " + isZeroVM());
     362        System.out.println("");
     363        System.out.println("System Properties:");
     364        TreeSet<String> keys = new TreeSet<String>(System.getProperties().stringPropertyNames());
     365        for (String k : keys) {
     366            String v = System.getProperty(k);
     367            if (k.equals("line.separator")) {
     368                if ("\n".equals(v))
     369                    v = "\\n";
     370                else if ("\r\n".equals(v))
     371                    v = "\\r\\n";
     372            }
     373            System.out.println(k + '=' + v);
     374        }
    361375    }
    362376}
Note: See TracChangeset for help on using the changeset viewer.