Belator, who is imprisoned at Hart Island following a final judgment of conviction for violation *127of sections of the Multiple Dwelling Code of the City of New York and the Multiple Dwelling Law of the State of New York, seeks to challenge such judgment by habeas corpus. Belator was fined $500 or, in default of payment of same, he was to be committed to the custody of the Commissioner of Correction of the City of New York for a period not exceeding 30 days. Belator alleges that he was illegally arrested, in that there was no sworn complaint, and also that the court had no jurisdiction to fine him for violation of an unconstitutional section of the law.
It is unnecessary to go into the merits of relator’s contentions in disposing of this writ, inasmuch as section 1231 of the Civil Practice Act provides that a writ of habeas corpus does not lie u Where he has been committed or is detained by virtue of the final judgment or decree of a competent tribunal of civil or criminal jurisdiction It has been repeatedly held by the Court of Appeals and the Appellate Divisions that after conviction the proper remedies by which to challenge the conviction are by appeal, by motion to vacate the judgment and by motion for a new trial, and where the time for the foregoing has expired, the remedy is by writ of corain nobis (People ex rel. Sedlak v. Foster, 299 N. Y. 291; Matter of Morhous v. New York Supreme Court, 293 N. Y. 131, 140; People ex rel. Bailey v. McCann, 222 App. Div. 465).
In Matter of Morhous v. New York Supreme Court (supra) the Court of Appeals stated (293 N. Y. 135): “ Imprisonment under a judgment rendered by a court which had jurisdiction to try the charge is not unlawful if measured solely by common-law rules and standards. 1 An imprisonment under a judgment cannot be unlawful, unless that judgment be an absolute nullity; and it is not nullity if the Court has general jurisdiction of the subject, although it should be erroneous.’ ”
The Court of Appeals went on to state (p. 136) that no writ of habeas corpus had ever been sustained by it where imprisonment was under final judgment of a court of competent jurisdiction. In any event, an examination of the relator’s contention that the court had no jurisdiction of his person by reason of the information not having been sworn, is not open for examination by this court upon a writ of habeas corpus, inasmuch as the minutes of the trial indicate that there was an information filed and, if defective, that is a matter for the appellate courts upon an appeal from the conviction.
Furthermore, habeas corpus is not available where there is a voluntary detention (People ex rel. Posner v. Vollner, 2 Misc 2d 575). In this instance the relator could have paid the $500 *128fine or appealed from the conviction and posted a bond in lieu of payment of the fine. Therefore this detention was a voluntary one, since it is within the relator’s power to have himself released from custody pending a determination by the appellate courts.
In any event, the relator having failed to give notice to the District Attorneys of the counties within which he was detained (Bronx) and from which he was committed (New York), no order may be made for his discharge (Civ. Prac. Act, § 1258, subd. 4; People ex rel. Carollo v. Brophy, 295 N. Y. 540, 542-543).
Therefore, in accordance with the foregoing, the writ of habeas corpus is dismissed, relator’s bail pending the determination of this motion is hereby revoked and the relator is ordered remanded to the custody of the' Commissioner of Correction.