Shell made from scratch in Java