Make Main.java in core change according to the restart port change