示例
protected
void
doGet(
HttpServletRequest
arg0,
HttpServletResponse
arg1) {
String
path = System.getenv(
"path"
);
}
解决方案
不使用 getenv(),而使用 ServletConfig 在启动时将配置信息传递到 Servlet 中,并且除去对 gc()、exit(int) 和 runFinalization() 的调用。