simple java shell implementation