This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes define and read environment variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "define and read environment variable" Watch "define and read environment variable" New topic
Author

define and read environment variable

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
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,

SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: define and read environment variable
 
Similar Threads
Define JVM Arguments using Weblogic 11g Admin Console
Managing Properties files
Page Expired in IE
UnsupportedClassVersionError, help
[SPRING] Using .properties File