Router written in java, school project