Tuesday, February 23, 2010

Accelerated Emt Course San Francisco

Java System Properties from

is sometimes important to know the characteristics of the system where we run our programs to evaluate the performance that he may have or just for informational purposes. Class System java.lang package allows us to use the following method:

static String getProperty ( String var)
Returns the system property specified by var. Java.version

version of Java Development Environment (JRE). Java.vendor
Name JRE distribution. Java.home
Installation directory of the virtual machine. Os.name
OS Name . Os.arch
Operating system architecture.
os.version Operating system version. User.name
system user name. User.home
User directory path of the system. Java.vm.name
Name installed virtual machine. Java.vm.version
version of the virtual machine installed.

These and other properties of the system can be found on page javadoc the method getProperties () .

addition, the System also provides the following method:

static String getenv ( String var) Lets see the value
a system environment variable specified.

For the environment variables in Ubuntu, in a terminal write the instruction "env" and press ENTER. While we see the environment variables this link for Windows.

In the images we see alguan obtained properties apart from some properties: Properties

Ubuntu system

System Properties in XP

Code Source: Propiedades.java

0 comments:

Post a Comment