Changed the java module to allow better control of where the various output goes.
Made building static libs threadsafe.
Some utils modifications.