On the filing of the application, the court must make and enter an order appointing the day for the hearing thereof. If the owner of the land resides within the state, the court must issue notice to him of the application and of the day of the hearing thereof, which must be served by the sheriff or other legal officer at least 10 days before the day appointed for the hearing. If the owner is unknown or if he resides without the state or has been absent from the state or beyond the jurisdiction of the court in which the application is made for six months next before the time of the filing of the application in said court, notice may be given by advertisement in any newspaper published in the county or, if there be no newspaper published in the county, by posting notice at the courthouse and three other public places for at least three weeks before the day appointed for the hearing. If the owner is an infant or of unsound mind, notice must be served on his guardian, if any he have, resident in the state, but if he resides in the state and has no such guardian, then the person who may have him in charge or with whom he may reside. If the owner is dead and the lands are in the possession or under the control of his personal representative, notice must be served on such representative and on the heirs at law of the decedent.