dmaguillo
asked on
Obtain data from environment vars
Hi real-genius.
How could i obtain data from Sun/Solaris environment variables?
We are development a java server (CORBA-JDBC), and need access to the information content in an environment system variable (Argsss, my english!).
Bye... :)
How could i obtain data from Sun/Solaris environment variables?
We are development a java server (CORBA-JDBC), and need access to the information content in an environment system variable (Argsss, my english!).
Bye... :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks...
You can define environment variables and in the java program you can access the value also.
Do like this:
First set environment variable
like this
set DMV_HOME=jdbc:odbc:mysourc
And then in the prorgam you can the value of this environment variable like this
String dmvhome=System.getProperty
But when you run the program you have to pass the environment variable to the program
using -D option
java -DDMV_HOME="%DMV_HOME%" GetProperty
Assume that my program name is GetProperty.java;