adding java support and updated auto saving accordingly