*485The opinion of the court was delivered by
Knapp, J.An alternative mandamus was, at the relator’s prayer, directed to the collector of Union county, to compel payment of certain fees and costs claimed of the county. The relator acted as a police justice in the city of Elizabeth, and the services for which this demand is made, were rendered by him between May, 1873, and April, 1875, in various ■trials and convictions under the act concerning disorderly persons. Rev., p. 306. He asks to be paid, for one hundred and forty-two convictions, the fees prescribed by supplement to the act constituting courts for the trial of small causes, passed April 6th, 1871. Rev., p. 565. The respondent, in his return to the writ, -resists the mandate to pay on two grounds formally averred in the return.
First, that the legally prescribed fees are payable to justices of the peace only, and that relator is not such officer, but a police justice of the city of Elizabeth, and consequently not entitled to such fees.
Second, that the convictions and commitments by virtue whereof the relator claims the money from the county collector, were illegal and void convictions and commitments, in that the relator, as police justice, sentenced and committed the several persons mentioned in the schedule to the writ to imprisonment in the county jail or work-house of the county of Union, when there was no work-house in said county during the period in which said convictions were .had and commitments made. To both these matters pleaded, the relator has demurred.
I shall pass to the second ground pleaded in bar of the relator’s claim to payment, for in that is found, as I think, a legal answer to the right asserted by the relator.
The essential facts admitted by the demurrer are, that the convictions and commitments for which fees are claimed, were judgments of imprisonment in the county jail or work-house of Union county, and that there was no work-house in the county at the time; the sentences were, therefore, to imprisonment in the county jail.
*486The act of June 10th, 1799, [Nix. Dig. 1007,) entitled “An act to describe, apprehend and punish disorderly persons,” marked out the procedure and prescribed the punishment to be inflicted in the case of disorderly persons. The third section provides that the justice shall commit such disorderly person, when convicted before him, to the worlt-house of the city, town or county, there to be kept at hard labor for any time not exceeding three calendar months.
The legislature, early in 1799, made provision by law for the purchase or erection of work-houses in all the counties of the state, by the boards of chosen freeholders of the several counties; and, subsequently, by an act passed March 4th, 1847, {Nix. Dig. 1057,) such boards were authorized to set apart a suitable space in the common jail of the county as a work-house, in order to carry out the intent of the original act. The work-house, as well as the jail, is a place of imprisonment, but the two were intended to be entirely distinct. They were under different government, and were devoted to-different classes of prisoners, under different management and discipline.
A commitment to the county jail for disorderly conduct has no authority under the act of 1799. A jail is not a workhouse, nor does it stand in its stead under that act; but the relator urges that, having the authority which the law gives to justices of the peace conferred upon him, he had jurisdiction of the subject matter and of the parties; and that the sentence to imprisonment in the county jail was an irregularity merely, and cannot be inquired into or questioned here. The fault of such judgment and sentence is of a graver character. We consider it as absolutely void, everywhere, and for all purposes—as much so as a sentence to a term in the state prison, or to banishment. A commitment precisely like this was held to be void in State v. Ellis, 2 Dutcher 219. The proceeding was upon habeas corpus, before Chief Justice Green. The petitioners were in prison, under a warrant of commitment issued by a justice of the peace, under the same *487act. The warrant ordered their imprisonment in the county jail. No part of the jail had been converted into a workhouse, and the Chief Justice treated the warrant of commitment, for that reason, as a nullity, and ordered the prisoners’ discharge, as unlawfully imprisoned.
The law requires a conviction and a commitment, with a bill of particulars of the justice’s costs annexed, as a condition precedent to the right to demand payment of the county collector. Rev., p. 566, § 141. The commitment should be such as the justice has jurisdiction to issue, and not a merely void instrument having that form.
Jurisdiction to try and punish offenders under the act, is conferred, generally, upon all justices of the peace; but it seems entirely plain that, in those counties, towns and cities where no work-house has been established, there is no mode in which the law against disorderly persons can be enforced, and, in such localities, cognizance cannot be taken of such cases. A prosecution can reach no possible judgment, and must inevitably end in entire failure, save in the creation of expense. The law itself there is practically as devoid of force as a law which forbids an act, but provides no penalty for its commission.
Union county was in a situation to preclude all possibility of .conviction and punishment, when the relator went through the form of prosecuting disorderly persons. No legal judgment to punish was possible, and the proceedings, which could have no other end or aim than an illegal punishment, were all unauthorized, and could not found a legitimate claim to fees.
The question whether the provisions of the supplement to the Small Cause act, passed April 6th, 1871, (Rev.,p. 565,) regulating fees of justices of the peace in criminal cases, applies to police justices in Elizabeth, is not free from doubt. Its discussion, however, is not necessary in this case, and could serve no public purpose, as subsequent legislation has made explicit provision for the fees of police justices. Pamph. L. 1880, p. 132.
*488The respondent’s plea above considered, presents a full answer to the matters contained in the writ, and the demurrer should be overruled.