Search code examples
exceptionjavasystem-propertiessystem-information

How to retrieve useful system information in java?


Which system information are useful - especially when tracing an exception or other problems down - in a java application?

I am thinking about details about exceptions, java/os information, memory/object consumptions, io information, environment/enchodings etc.


Solution

  • For pure java applications:

    System.getProperty("org.xml.sax.driver") 
    System.getProperty("java.version")
    System.getProperty("java.vm.version")
    System.getProperty("os.name")
    System.getProperty("os.version")
    System.getProperty("os.arch")