Obtains properties of the system.
1 system.getProperty
<system.getProperty name='name'/>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Key of the property. |
Returns | |
---|---|
Type | Description |
Properties |
Example
Obtain the version of the Java Runtime Environment (JRE).
Copy
<xsql-script name='system_getProperty_sample1'> <body> <println> <system.getProperty name='java.version' /> </println> </body> </xsql-script>
The result on screen would be the following:
Copy
1.5.0_03
Example
Obtain the installation directory of Java.
Copy
<xsql-script name='system_getProperty_sample2'> <body> <println> <system.getProperty name='java.home' /> </println> </body> </xsql-script>
The result on screen would be the following:
Copy
C:\Archivos de programa\Java\jdk1.5.0_03\jre
Example
Obtain the name of the operative system (OS).
Copy
<xsql-script name='system_getProperty_sample3'> <body> <println> <system.getProperty name='os.name' /> </println> </body> </xsql-script>
The result on screen would be the following:
Copy
Windows XP