on 03-06-2006 12:59 PM
Hi folks,
am I right when I say that it is not possible to access UNIX environment variables from Java (these ones delared by the export statement)?
Cheers,
Heiko
yes you are right. Java is platform independend and therefor there is no way to access theses environment variables. As a workaround you can get the environment variables by executing a unix command with the exec() method. This is of course not very elegant.
regards
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes.. Since some OS do not have the concept of environment variables,it is directly not possible.
But using the method System.getProperties you can get
some inf about the environment.
the following links may be of some help to you
http://www.javaworld.com/javaworld/javaqa/2001-07/01-qa-0706-env.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.