Top Description Inners Fields Constructors Methods
jdk.internal.util

public final Class SystemProps

extends Object
Class Inheritance
Imports
java.lang.annotation.Native, java.util.HashMap, .Map, java.io.File

System Property initialization for internal use only Retrieves the platform, JVM, and command line properties, applies initial defaults and returns the Properties instance that becomes the System.getProperties instance.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SystemProps.Raw

Read the raw properties from native System.c.

Field Summary

Modifier and TypeField and Description
private static String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
fillI18nProps(HashMap<String, String> cmdProps, String
the base property name
base
,
String
the display value for the base
display
,
String
the format value for the base
format
)

For internationalization options, compute the values for display and format properties MUST NOT override command line defined values.

public static Map<String, String>

Returns:

a Properties instance initialized with all of the properties
initProperties
()

Create and initialize the system properties from the native properties and command line properties.

public static boolean

Returns:

a boolean value
isBadIoTmpdir
()

Check if warning for custom java.io.tmpdir is required.

private static void
put(HashMap<String, String>
the Properties
props
,
String
the key
key
,
String
the value
value
)

Puts the property if it is non-null

private static void
putIfAbsent(HashMap<String, String>
the Properties
props
,
String
the key
key
,
String
the value
value
)

Puts the property if it is non-null and is not already in the Properties.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

customTmpdirback to summary
private static String customTmpdir

Constructor Detail

SystemPropsback to summary
private SystemProps()

Method Detail

fillI18nPropsback to summary
private static void fillI18nProps(HashMap<String, String> cmdProps, String base, String display, String format)

For internationalization options, compute the values for display and format properties MUST NOT override command line defined values.

Parameters
base:String

the base property name

display:String

the display value for the base

format:String

the format value for the base

initPropertiesback to summary
public static Map<String, String> initProperties()

Create and initialize the system properties from the native properties and command line properties.

Note

Build-defined properties such as versions and vendor information are initialized by VersionProps.java-template.

Returns:Map<String, String>

a Properties instance initialized with all of the properties

isBadIoTmpdirback to summary
public static boolean isBadIoTmpdir()

Check if warning for custom java.io.tmpdir is required.

Returns:boolean

a boolean value

putback to summary
private static void put(HashMap<String, String> props, String key, String value)

Puts the property if it is non-null

Parameters
props:HashMap<String, String>

the Properties

key:String

the key

value:String

the value

putIfAbsentback to summary
private static void putIfAbsent(HashMap<String, String> props, String key, String value)

Puts the property if it is non-null and is not already in the Properties.

Parameters
props:HashMap<String, String>

the Properties

key:String

the key

value:String

the value

jdk.internal.util back to summary

public Class SystemProps.Raw

extends Object
Class Inheritance

Read the raw properties from native System.c.

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final String[]

Constructor Summary

AccessConstructor and Description
private
Raw()

Method Summary

Modifier and TypeMethod and Description
private HashMap<String, String>

Returns:

return a Properties instance of the command line and VM options
cmdProperties
()

Return a Properties instance of the command line and VM options defined by name and value.

private static native String[]

Returns:

a array of strings, the properties are indexed by the _xxx_NDX indexes. The values are Strings and may be null.
platformProperties
()

Returns the platform specific property values identified by "_xxx_NDX" indexes.

pack-priv String

Returns:

the value
propDefault
(int
the index of the known property
index
)

Return the value for a well known default from native.

private static native String[]

Returns:

an array of strings, with alternating key and value strings. Either keys or values may be null, the array may not be full. The first null key indicates there are no more key, value pairs.
vmProperties
()

Returns the available VM and Command Line Properties.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_display_country_NDXback to summary
private static final int _display_country_NDX
Annotations
@Native
_display_language_NDXback to summary
private static final int _display_language_NDX
Annotations
@Native
_display_script_NDXback to summary
private static final int _display_script_NDX
Annotations
@Native
_display_variant_NDXback to summary
private static final int _display_variant_NDX
Annotations
@Native
_file_encoding_NDXback to summary
private static final int _file_encoding_NDX
Annotations
@Native
_file_separator_NDXback to summary
private static final int _file_separator_NDX
Annotations
@Native
_format_country_NDXback to summary
private static final int _format_country_NDX
Annotations
@Native
_format_language_NDXback to summary
private static final int _format_language_NDX
Annotations
@Native
_format_script_NDXback to summary
private static final int _format_script_NDX
Annotations
@Native
_format_variant_NDXback to summary
private static final int _format_variant_NDX
Annotations
@Native
_ftp_nonProxyHosts_NDXback to summary
private static final int _ftp_nonProxyHosts_NDX
Annotations
@Native
_ftp_proxyHost_NDXback to summary
private static final int _ftp_proxyHost_NDX
Annotations
@Native
_ftp_proxyPort_NDXback to summary
private static final int _ftp_proxyPort_NDX
Annotations
@Native
_http_nonProxyHosts_NDXback to summary
private static final int _http_nonProxyHosts_NDX
Annotations
@Native
_http_proxyHost_NDXback to summary
private static final int _http_proxyHost_NDX
Annotations
@Native
_http_proxyPort_NDXback to summary
private static final int _http_proxyPort_NDX
Annotations
@Native
_https_proxyHost_NDXback to summary
private static final int _https_proxyHost_NDX
Annotations
@Native
_https_proxyPort_NDXback to summary
private static final int _https_proxyPort_NDX
Annotations
@Native
_java_io_tmpdir_NDXback to summary
private static final int _java_io_tmpdir_NDX
Annotations
@Native
_line_separator_NDXback to summary
private static final int _line_separator_NDX
Annotations
@Native
_os_arch_NDXback to summary
private static final int _os_arch_NDX
Annotations
@Native
_os_name_NDXback to summary
private static final int _os_name_NDX
Annotations
@Native
_os_version_NDXback to summary
private static final int _os_version_NDX
Annotations
@Native
_path_separator_NDXback to summary
private static final int _path_separator_NDX
Annotations
@Native
_socksNonProxyHosts_NDXback to summary
private static final int _socksNonProxyHosts_NDX
Annotations
@Native
_socksProxyHost_NDXback to summary
private static final int _socksProxyHost_NDX
Annotations
@Native
_socksProxyPort_NDXback to summary
private static final int _socksProxyPort_NDX
Annotations
@Native
_stderr_encoding_NDXback to summary
private static final int _stderr_encoding_NDX
Annotations
@Native
_stdout_encoding_NDXback to summary
private static final int _stdout_encoding_NDX
Annotations
@Native
_sun_arch_abi_NDXback to summary
private static final int _sun_arch_abi_NDX
Annotations
@Native
_sun_arch_data_model_NDXback to summary
private static final int _sun_arch_data_model_NDX
Annotations
@Native
_sun_cpu_endian_NDXback to summary
private static final int _sun_cpu_endian_NDX
Annotations
@Native
_sun_cpu_isalist_NDXback to summary
private static final int _sun_cpu_isalist_NDX
Annotations
@Native
_sun_io_unicode_encoding_NDXback to summary
private static final int _sun_io_unicode_encoding_NDX
Annotations
@Native
_sun_jnu_encoding_NDXback to summary
private static final int _sun_jnu_encoding_NDX
Annotations
@Native
_sun_os_patch_level_NDXback to summary
private static final int _sun_os_patch_level_NDX
Annotations
@Native
_user_dir_NDXback to summary
private static final int _user_dir_NDX
Annotations
@Native
_user_home_NDXback to summary
private static final int _user_home_NDX
Annotations
@Native
_user_name_NDXback to summary
private static final int _user_name_NDX
Annotations
@Native
FIXED_LENGTHback to summary
private static final int FIXED_LENGTH
Annotations
@Native
platformPropsback to summary
private final String[] platformProps

Constructor Detail

Rawback to summary
private Raw()

Method Detail

cmdPropertiesback to summary
private HashMap<String, String> cmdProperties()

Return a Properties instance of the command line and VM options defined by name and value. The Properties instance is sized to include the fixed properties.

Returns:HashMap<String, String>

return a Properties instance of the command line and VM options

platformPropertiesback to summary
private static native String[] platformProperties()

Returns the platform specific property values identified by "_xxx_NDX" indexes. The indexes are strictly private, to be shared only with the native code.

Returns:String[]

a array of strings, the properties are indexed by the _xxx_NDX indexes. The values are Strings and may be null.

propDefaultback to summary
pack-priv String propDefault(int index)

Return the value for a well known default from native.

Parameters
index:int

the index of the known property

Returns:String

the value

vmPropertiesback to summary
private static native String[] vmProperties()

Returns the available VM and Command Line Properties. The VM supplies some key/value pairs and processes the command line to extract key/value pairs from the "-Dkey=value" arguments.

Returns:String[]

an array of strings, with alternating key and value strings. Either keys or values may be null, the array may not be full. The first null key indicates there are no more key, value pairs.