627 * <td>File separator ("/" on UNIX)</td></tr> 628 * <tr><td><code>path.separator</code></td> 629 * <td>Path separator (":" on UNIX)</td></tr> 630 * <tr><td><code>line.separator</code></td> 631 * <td>Line separator ("\n" on UNIX)</td></tr> 632 * <tr><td><code>user.name</code></td> 633 * <td>User's account name</td></tr> 634 * <tr><td><code>user.home</code></td> 635 * <td>User's home directory</td></tr> 636 * <tr><td><code>user.dir</code></td> 637 * <td>User's current working directory</td></tr> 638 * </table> 639 * <p> 640 * Multiple paths in a system property value are separated by the path 641 * separator character of the platform. 642 * <p> 643 * Note that even if the security manager does not permit the 644 * <code>getProperties</code> operation, it may choose to permit the 645 * {@link #getProperty(String)} operation. 646 * 647 * @implNote In addition to the standard system properties, the {@code 648 * java} launcher may create the Java Virtual Machine with system 649 * properties that have the following keys: 650 * <table summary="Shows property keys and associated values"> 651 * <tr><th>Key</th> 652 * <th>Description of Associated Value</th></tr> 653 * <tr><td>{@code jdk.module.path}</td> 654 * <td>Application module path</td></tr> 655 * <tr><td>{@code jdk.upgrade.module.path}</td> 656 * <td>The upgrade module path</td></tr> 657 * <tr><td>{@code jdk.module.main}</td> 658 * <td>The module name of the initial/main module</td></tr> 659 * <tr><td>{@code jdk.module.main.class}</td> 660 * <td>The main class name of the initial module</td></tr> 661 * </table> 662 * These properties may also be set by custom launchers that use the JNI 663 * invocation API to create the Java Virtual Machine. 664 * 665 * @return the system properties 666 * @exception SecurityException if a security manager exists and its 667 * <code>checkPropertiesAccess</code> method doesn't allow access 668 * to the system properties. 669 * @see #setProperties 670 * @see java.lang.SecurityException 671 * @see java.lang.SecurityManager#checkPropertiesAccess() 672 * @see java.util.Properties 673 */ 674 public static Properties getProperties() { 675 SecurityManager sm = getSecurityManager(); 676 if (sm != null) { 677 sm.checkPropertiesAccess(); 678 } 679 680 return props; 681 } 682 683 /** | 627 * <td>File separator ("/" on UNIX)</td></tr> 628 * <tr><td><code>path.separator</code></td> 629 * <td>Path separator (":" on UNIX)</td></tr> 630 * <tr><td><code>line.separator</code></td> 631 * <td>Line separator ("\n" on UNIX)</td></tr> 632 * <tr><td><code>user.name</code></td> 633 * <td>User's account name</td></tr> 634 * <tr><td><code>user.home</code></td> 635 * <td>User's home directory</td></tr> 636 * <tr><td><code>user.dir</code></td> 637 * <td>User's current working directory</td></tr> 638 * </table> 639 * <p> 640 * Multiple paths in a system property value are separated by the path 641 * separator character of the platform. 642 * <p> 643 * Note that even if the security manager does not permit the 644 * <code>getProperties</code> operation, it may choose to permit the 645 * {@link #getProperty(String)} operation. 646 * 647 * @implNote In addition to the standard system properties, the system 648 * properties may include the following keys: 649 * <table summary="Shows property keys and associated values"> 650 * <tr><th>Key</th> 651 * <th>Description of Associated Value</th></tr> 652 * <tr><td>{@code jdk.module.path}</td> 653 * <td>The application module path</td></tr> 654 * <tr><td>{@code jdk.module.upgrade.path}</td> 655 * <td>The upgrade module path</td></tr> 656 * <tr><td>{@code jdk.module.main}</td> 657 * <td>The module name of the initial/main module</td></tr> 658 * <tr><td>{@code jdk.module.main.class}</td> 659 * <td>The main class name of the initial module</td></tr> 660 * </table> 661 * 662 * @return the system properties 663 * @exception SecurityException if a security manager exists and its 664 * <code>checkPropertiesAccess</code> method doesn't allow access 665 * to the system properties. 666 * @see #setProperties 667 * @see java.lang.SecurityException 668 * @see java.lang.SecurityManager#checkPropertiesAccess() 669 * @see java.util.Properties 670 */ 671 public static Properties getProperties() { 672 SecurityManager sm = getSecurityManager(); 673 if (sm != null) { 674 sm.checkPropertiesAccess(); 675 } 676 677 return props; 678 } 679 680 /** |