cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read environment variable

Former Member
0 Likes
157

Hi all,

is there any standard way to read an environment variable (not a java system property) within the SAP J2EE Engine? There is no standard way to so in Java, at least not in Java 1.4.

Thanks in advance,

Matthias

View Entire Topic
roberto_tagliento
Active Contributor
0 Likes
Former Member
0 Likes

Hi Roberto,

thanks for your replies, but I don't think that they help me a lot...

The method System.getenv(String name) is deprecated under Java 1.4, it will throw an error.

And the IBM class seems only to work on AS/400, which we don't use.

Regards,

Matthias

roberto_tagliento
Active Contributor
0 Likes

mmmmhhhh

you are right.

Maybe in 1.5 System.getenv is "un-deprecated".

By the way there is a funny solution.

Execute a OS command like to prompt by CODE and parse the result.

LOOK HERE!

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4199068