那就没有/** * Gets the system property indicated by the specified key. * <p> * First, if there is a security manager, its * <code>checkPropertyAccess</code> method is called with the key as * its argument. This may result in a SecurityException. * <p> * If there is no current set of system properties, a set of system * properties is first created and initialized in the same manner as * for the <code>getProperties</code> method. * * @param key the name of the system property. * @return the string value of the system property, * or <code>null</code> if there is no property with that key. * * @exception SecurityException if a security manager exists and its * <code>checkPropertyAccess</code> method doesn't allow * access to the specified system property. * @exception NullPointerException if <code>key</code> is * <code>null</code>. * @exception IllegalArgumentException if <code>key</code> is empty. * @see #setProperty * @see java.lang.SecurityException * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) * @see java.lang.System#getProperties() */ public static String getProperty(String key) { checkKey(key); SecurityManager sm = getSecurityManager(); if (sm != null) { sm.checkPropertyAccess(key); }
* Gets the system property indicated by the specified key.
* <p>
* First, if there is a security manager, its
* <code>checkPropertyAccess</code> method is called with the key as
* its argument. This may result in a SecurityException.
* <p>
* If there is no current set of system properties, a set of system
* properties is first created and initialized in the same manner as
* for the <code>getProperties</code> method.
*
* @param key the name of the system property.
* @return the string value of the system property,
* or <code>null</code> if there is no property with that key.
*
* @exception SecurityException if a security manager exists and its
* <code>checkPropertyAccess</code> method doesn't allow
* access to the specified system property.
* @exception NullPointerException if <code>key</code> is
* <code>null</code>.
* @exception IllegalArgumentException if <code>key</code> is empty.
* @see #setProperty
* @see java.lang.SecurityException
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperties()
*/
public static String getProperty(String key) {
checkKey(key);
SecurityManager sm = getSecurityManager();
if (sm != null) {
sm.checkPropertyAccess(key);
}