在Eclipse下运行System.getenv("COM_TRUNK")返回null,在shell下运行则正常。 在/etc/environment中添加COM_TRUNK=/home/ubuntu/com既可。