Java system properties and environment variables

  • System properties are set on the Java command line using the -Dpropertyname=value syntax. They can also be added at runtime
    using System.setProperty(String key, String value) or via the various
    System.getProperties().load() methods.
    To get a specific system property you can use System.getProperty(String key) or System.getProperty(String key, String def).

  • Environment variables are set in the OS, e.g. in Linux export HOME=/Users/myusername or on Windows SET WINDIR=C:\Windows etc,
    and, unlike properties, may not be set at runtime.
    To get a specific environment variable you can use System.getenv(String name).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)