Also, more than being a JBoss specific problem, i guess you would see the same behaviour on a standalone Java program. Could you just try a simple java program which does the same - to figure out whether that works.
I am also facing a similar problem with JBOSS 4.0.5GA on Linux. I am using JDK 1.5 and hence using System.getenv is perfectly acceptable. My program is able to read the environment variable SETTINGS_CFG as a standalone program in linux and in Windows it works both as standalone and from within JBOSS. But on Linux with JBOSS it gives null. Is it specific to JBOSS/Linux and any workarounds to solve this problem?
Please note that I cannot use System.getProperty as suggested in my context. Appreciate your help.