Frage

Is it possible to display/print values of system properties without installing any program.

I am thinking perhaps one of the programs in jre/bin might do it.

Situation is that there is a locked-down system which is reporting strange values for "os.name" and I cannot install a tool to run.

War es hilfreich?

Lösung 2

JVisualVM is part of the jdk and can show the system properties of JVMs running on the same machine. If you want to see the values of no particular JVM you can just look at the system properties of JVisualVM’s own JVM.

With Freehand Circles

Andere Tipps

You can print them all using the next command:

 java -XshowSettings:all -version

This code snipped does print the system properties:

public static void main(String[] args) {
    Properties properties = System.getProperties();
    for (String name : properties.stringPropertyNames()) {
        System.out.printf("%s=%s\n", name, properties.getProperty(name));
    }
}

Check jconsole. to start jconsole , go inside your installation's bin directory and type ./jconsole on terminal. I hope it may help you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top