thin-jar changes to java code

still need to change python to match this