
42 Wis.2d 534 (1969)
167 N.W.2d 214
STATE EX REL. DORE, Appellant,
v.
STOLTZ, County Judge, Respondent.
No. 220.
Supreme Court of Wisconsin.
Argued April 3, 1969.
Decided May 6, 1969.
*537 For the appellant there was a brief by Shellow, Shellow & Coffey and Robert H. Friebert, all of Milwaukee, and oral argument by Mr. Friebert.
For the respondent there was a brief by William F. Alderson, and oral argument by C. J. Schloemer, both of West Bend.
HANLEY, J.
The following issues are presented on this appeal:
(1) Whether prohibition was the proper remedy to be used by petitioner; and
(2) Whether the circuit court has jurisdiction to reach the merits of a petition for a writ of prohibition directed against the county court when both the circuit court and the county court have concurrent jurisdiction of the subject matter, and the county court has exercised such subject matter jurisdiction.

Petitioner's Remedy.
The two motions to dismiss which were addressed to the county court challenged:
(1) The validity of the complaint, and
(2) The evidence resulting in a bindover.
The respondent in this case argues that the petitioner's remedy, when his motion to dismiss was denied, was to appeal from the order denying the motion. Such an order is not reviewable by appeal or by writ of error.
"... The general rule is that the writ lies after final judgment, or after an order in the nature of a final judgment, rendered in a court of law, to correct some supposed mistake which is apparent on the face of the record...." Martin v. State (1941), 236 Wis. 571, 573, 574, 295 N. W. 681. (Emphasis supplied.)
*538 An "order in the nature of a final judgment" is one ending a proceeding and preventing a final judgment. Martin v. State, supra, and Babbitt v. State (1964), 23 Wis. 2d 446, 127 N. W. 2d 405. The denial of a motion to dismiss does not terminate the proceedings before the tribunal in question. Moreover, this court specifically stated in State ex rel. Offerdahl v. State (1962), 17 Wis. 2d 334, 116 N. W. 2d 809, that an order denying a motion to dismiss is a nonappealable order. Neither appeal nor writ of error lies to review such a ruling.
What then was the petitioner's remedy when his motions to dismiss were denied? Petitioner concluded, undoubtedly based on State ex rel. Klinkiewicz v. Duffy (1967), 35 Wis. 2d 369, 151 N. W. 2d 63, that his remedy was by writ of prohibition. The Klinkiewicz Case, supra, involved a challenge to a magistrate's jurisdiction when he failed to hold a preliminary examination within the statutory period. Although the case did not deal with a bindover after a preliminary hearing, the court went on record as saying:
"... an appeal does not lie from the order of a magistrate binding over the accused to a court of record. Therefore, in case of such an order of bindover by a magistrate the accused's only remedy would be by prerogative writ." State ex rel. Klinkiewicz v. Duffy, supra, at page 376.
It involved an absolute loss of jurisdiction because of a violation of a mandatory statutory provision.
A writ of prohibition will not be issued when there is an adequate remedy by appeal or otherwise. See Drugsvold v. Small Claims Court (1961), 13 Wis. 2d 228, 231, 108 N. W. 2d 648. This court has long approved the use of habeas corpus to challenge the validity of a complaint and the validity of a bindover, and we now declare that this is the sole remedy for this type of situation.
"... It is also the duty of the court on habeas corpus to examine the complaint, and discharge the prisoner if *539 it does not state an offense known to the law; and to examine the evidence and treat the decision of the examining magistrate as outside of his jurisdiction if no competent evidence is found upon which such magistrate could properly have acted...." State ex rel. Durner v. Huegin (1901), 110 Wis. 189, 235, 85 N. W. 1046.
"... While it is true that such writ [habeas corpus] never takes the place of a writ of error, and is confined to jurisdictional defects, when it is resorted to merely for the purpose of liberating a person detained in custody to await his trial on a charge of being guilty of a criminal offense, the questions of whether there was any evidence for the magistrate to act upon and whether the complaint charges any offense known to the law are jurisdictional matters. The reviewing court, in the exercise of its function, must necessarily pass upon and reverse or affirm the decision of the committing magistrate, if such matters are properly presented for its consideration, according to its determination thereof, and in doing so it does not go beyond jurisdictional defects. It can examine the evidence only sufficiently to discover whether there was any substantial ground for the exercise of judgment by the committing magistrate. It cannot go beyond that and weigh the evidence. It can say whether the complaint will admit of a construction charging a criminal offense, or whether the evidence rendered the charge against the prisoner within reasonable probabilities. That is all. When it has discovered that there was competent evidence for the judicial mind of the examining magistrate to act upon in determining the existence of the essential facts, it has reached the limit of its jurisdiction on that point. If the examining magistrate acts without evidence, he exceeds his jurisdiction...." State ex rel. Durner v. Huegin, supra, at pages 236, 237.
The case quoted from above exhaustively discusses the relief available from habeas corpus and the proper tests to be applied by the trial court in evaluating the complaint and the evidence. That case has recently been cited with approval by this court:
"... Therefore the writ of habeas corpus can be used to test whether there is any competent evidence `for the *540 judicial mind of the examining magistrate to act upon in determining the existence of the essential facts,' and whether the complaint charged an offense known to law." Wolke v. Fleming (1964), 24 Wis. 2d 606, 614, 129 N. W. 2d 841.
From an administrative standpoint, the use of habeas corpus to test the validity of the complaint and the bindover is certainly preferable to the use of prohibition because of the following provision in sec. 274.05, Stats.:
"... But no writ of error shall issue or appeal lie to review an order or judgment on habeas corpus remanding to custody a prisoner committed for trial pursuant to s. 954.13 [bindover] unless allowed by one of the justices of the supreme court upon a finding that the writ or appeal is not sought for dilatory purposes, after reasonable notice of application for the writ or for leave to appeal and opportunity to be heard to the attorney general and the district attorney of the county involved."
It clearly appears that the petitioner had an adequate remedy to challenge the validity of the complaint and the evidence produced at the preliminary hearing which resulted in a bindover.
By making a motion to dismiss before the county court, however, the petitioner waived any objection to the jurisdiction of that court.
"Relator submitted to the jurisdiction of the circuit court by making his motion to dismiss in that court. Having done so, he can no longer seek habeas corpus to test the sufficiency of the evidence at the preliminary examination. ..." State ex rel. Offerdahl v. State, supra, at page 336.
Obviously, the waiver of any objection to the jurisdiction of the court would be exactly the same whether the petitioner sought a writ of habeas corpus or a writ of prohibition. *541 A party cannot submit to the jurisdiction of the court and later challenge the court's jurisdiction.[1]
Since the petitioner had already submitted to the jurisdiction of the county court, it was entirely proper for the circuit court to quash the alternative writ of prohibition. We are also of the opinion that prohibition was not a proper remedy in this case. We, therefore, do not reach the question of supervisory authority of the circuit court.
By the Court.Order affirmed.
NOTES
[1]  Petitioner has not argued that his motions to dismiss which were directed to the county court constituted a special appearance to challenge the jurisdiction of the county court. Nor do the motions themselves indicate that the movant was appearing specially.
