If you start your domain via "asadmin start-domain" in V2 or V3 then the current working directory is GUARANTEED to be the domain's config directory.
With a default setup you can access the docroot directory like so:
File docroot = new File("../docroot");
[Message sent by forum member 'bnevins' (byron.nevins_at_sun.com)]
http://forums.java.net/jive/thread.jspa?messageID=383316