A start on the java part