How can I upload and password protect Javadocs in WordPress?

You can set up your server to protect a directory of your choice and allow access only to the user running apache/nginx/etc. You would have to write something to verify the user’s credentials and then deliver the file or redirect to the proper url.

It’s not difficult, but I don’t know of a solution that would support this.