refactor oracle's main.m to apple java conventions