Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Applies To : All JDK

Author(s):      Biplab Ray

Company:      Tata Consultancy Services

Created on:    13th February 2015

Author Bio:

Biplab Ray is working for Tata Consultancy Services as Assistant Consultant and development of SAP EP, composite applications using CAF, BPM, BRM, WebDynpro for Java. He also works in technologies like Java/J2EE and has depth understanding on eSOA, Webservice, Enterprise Service, XML.

Requirement :

In many situation, we might require to know the system configuration.

Implementation:

1. Create one Java class.

And Implementation as below :

import java.util.Properties;

import java.util.Set;

import java.util.Iterator;

public class MyFirstJavaProgram {

    public static void main(String []args) {

 

       Properties prop = System.getProperties();

       Set<String> set = prop.stringPropertyNames();

 

       Iterator<String> itr = set.iterator();

       while(itr.hasNext()){

           String string_Key = itr.next();

           String string_Value = prop.getProperty(string_Key);     

           System.out.println(string_Key + " : " + string_Value);

       }

     }

}

Output Like Below:

java.runtime.name : OpenJDK Runtime Environment.

Labels in this area