For the most part, this is reasonably easy. There is only one problem case, in ClassDocImpl, where javadoc currently looks for the package doc in package doc in the same directory as the class' source file.
The right way to do this in JSR 199 is to look for the package file on the source path.
The old way is problematic for a general file manager.
the fix is to try looking on the source path, and if not found, and if its a standard file manager, to roll over to the old behavior using direct access to the file system.