• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to create environmental variables in Websphere Application Server

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,
Please provide information on how to create environment variables in websphere application server and retrieve the same from a java application.
I have following lines of code which is trying to fetch the value of environmental variable.
String environment = System.getProperty("policyService.environment");
actually this variable will decide the environment in which the code is deployed and will proceed accordingly.
When I try to print the value of the variable I am getting as null. Dont know whether this variable is environmental variable of websphere variable.

Please assist.

Regards,
sreeni.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the admin console:

Application servers -> (server name) -> Server Infrastructure, Java and Process Management, Process Definition -> Java Virtual Machine -> Custom Properties.

(The exact sequence may vary depending on what version of Websphere you are using.)

The entries you make here are system properties (not environment variables and not Websphere variables). They can be accessed via System.getProperty() as in your example.
 
sreenivas vemula
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,
Thanks a ton

Regards,
sreeni.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic