Topic
  • 2 replies
  • Latest Post - ‏2006-05-30T14:37:20Z by SystemAdmin
SystemAdmin
SystemAdmin
1215 Posts

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

    Re: How can I access System Properties from Java Code

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

    Re: How can I access System Properties from Java Code

    ‏2006-05-30T14:37:20Z  
    thanks