Added jre support, minor changes.