File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

define and read environment variable

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im using Weblogic 10.3.1. I have server defined in weblogic and on server startup i have defined a variable
-Dserver.env=DEV

in TEST enviroment , this variable will have value TEST and in PROD it will be PROD.

My questions are :
1) is it the right way to define an environment variable ?
2) how can i access the variable and value from JAva?

I tried System.getProperty("server.env"); but its returning null..


Thanks in advance,
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic