Java port & move to source layout etc. used by other plugins.