OS simulation in Java