Domanda

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.

È stato utile?

Soluzione 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

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top