Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2006-05-30T14:37:20Z by SystemAdmin
SystemAdmin
SystemAdmin
1215 Posts
ACCEPTED ANSWER

Pinned topic How can I access System Properties from Java Code

‏2006-05-03T21:09:55Z |
Hello,

I have an variable (my.environment) set inside the following location via my WebSphere Administratior.

Application servers > server1 > Process Definition > Java Virtual Machine > Custom Properties > my.environment

How can I access this value inside Java Code?

Thanks
Updated on 2006-05-30T14:37:20Z at 2006-05-30T14:37:20Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1215 Posts
    ACCEPTED ANSWER

    Re: How can I access System Properties from Java Code

    ‏2006-05-30T14:35:10Z  in response to SystemAdmin
    Simply:
    String value = System.getProperty("my.environment");
  • SystemAdmin
    SystemAdmin
    1215 Posts
    ACCEPTED ANSWER

    Re: How can I access System Properties from Java Code

    ‏2006-05-30T14:37:20Z  in response to SystemAdmin
    thanks