cancel
Showing results for 
Search instead for 
Did you mean: 

Read environment variable

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

roberto_tagliento
Active Contributor
0 Kudos
Former Member
0 Kudos

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 Kudos

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