My production server runs Linux using System V style init scripts.
Tomcat is brought up by running service tomcat6 start as root user (service runs init script under cwd /).
Tomcat then serves a web page to write the result of new File(".").getAbsolutePath(), which shows /usr/share/tomcat6/.
But Tomcat init script (/etc/init.d/tomcat6) makes no mention of CWD, neither does it have any cd command.
Given that Java itself cannot change current working directory, then how come /usr/share/tomcat6 became Tomcat's current working directory? Where in its startup process changes its cwd?
The Linux in question is CentOS6.