Add standard exports to the java client.

Don't include memory for now, it is non-trivial to get
cross platform.
Why are you downcasting this?  Are you relying on something vendor-specific from that type?