Small tweaks to get Java to compile (but not working).