A set of system properties, accessible via the getSystemProperties() method of class System allows you to get all sorts of useful information.
class GetPropertyDemo
{
public static void main(String args[])
{
// Display value for machine type and OS
System.out.println ( System.getProperty("os.arch") +
" running " +
System.getProperty("os.name") );
}
}
SOURCE : www.referjava.com
No comments:
Post a Comment