move java to main