Java file commit