Java to process