It is not denied that trespass quare clausum fregit is a local action, and that at common law the courts of this Commonwealth have no jurisdiction of trespass upon land in another State or country. The objection is not that an action of which the court has jurisdiction is brought in the wrong county, but that the court has not jurisdiction of the cause of action. Briggs v. Nantucket Bank, 5 Mass. 94. Lawrence v. Smith, 5 Mass. 362. Rogers v. Woodbury, 15 Pick. 156. Clark v. Scudder, 6 Gray, 122. Niles v. Howe, 57 Vt. 388. Watts v. Kinney, 6 Hill, (N. Y.) 82.
It is contended that the courts of this Commonwealth are given jurisdiction of the subject matter of the suit by the Pub. Sts. c. 183, § 1, which provide that all personal actions, except certain named, may be commenced by trustee process, and by § 3, which provides that trustee writs shall be returnable in the county in which the trustee lives or has his usual place of business. Trespass quare clausum is a personal action, and may be commenced by trustee process under the first section of this statute. Way v. Dame, 11 Allen, 357. Wilder v. Bailey, 3 Mass. 289, 291. It is also a local action, and must be brought in the county where the land lies, unless when otherwise provided by statute. The effect of § 3 is, that, when the action is commenced by trustee process, it must be brought in the county of the trustee ; and so far the statute modifies the common law, by which it must be brought in the county in which the land lies. The contention of the plaintiff is, that the statute not only *562fixes the county in which the action shall be brought when it is commenced by trustee process, but gives the courts of this Commonwealth jurisdiction of an action which could not have been brought in any county. It cannot be argued that the statute gives jurisdiction over trespass to land in another State only in an action commenced by trustee process, and the plaintiff is forced to contend that it gives jurisdiction over the cause of action without regard to the form of the writ; in other words, that it changes the action of trespass quare clausum when the land lies without the jurisdiction of our courts from a local to a transitory action. But if this is the effect of the statute, it is impossible to confine it to causes of action arising without the State. The statute makes no distinction between trespass to lands without and within the State. It includes trespass quare clausum only as it is a personal action, and requiring the action when brought by trustee writ to be brought in the county of the trustee, cannot make it a transitory action as to lands without, and not as to lands within, the State. There seems to be no reason for holding that the statute renders an action for trespass to lands outside the State transitory which does not apply to an action for trespass to lands within the State.
The plain and simple meaning of the statute is, that, when a party is entitled to a personal action, he may commence it by trustee process, and that actions, whether local or transitory, commenced by trustee process, shall be brought in the county in which the trustee lives. A construction is asked for it which will authorize an action to which the party was not entitled, and the logical result of which would be to change into transitory actions all local actions which can be commenced by trustee process. The statute has been in existence nearly one hundred years, and we have not been referred to any authority or dictum to sustain the position of the plaintiff. On the contrary, the action of trespass quare clausum has always been treated as a local action. The St. of 1794, c. 65, authorized a person entitled to any personal action, with the specified exceptions, to sue by trustee writ, and contained the same provisions as to the county in which the action should be brought as the Public Statutes. By the Rev. Sts. c. 109, §§ 1, 71, and the Gen. Sts. c. 142, §§ 1, 75, all personal actions, with the specified exceptions, *563brought in the Court of Common Pleas or the Supreme Judicial Court, might be commenced by trustee process, and personal actions with the same exceptions, within the jurisdiction of, and which might be brought by the ordinary process before, a justice of the peace, might be commenced by trustee process. The meaning of the statutes was not changed when they were consolidated in the Public Statutes in the words “ all personal actions . . . may be commenced by trustee process,” and the jurisdiction of the higher courts, or of justices of the peace, was not thereby extended to personal actions or causes of action, of which they had not jurisdiction before the statute. The statute only regarded the process in actions which parties were entitled to bring, and the venue of actions brought by the process especially authorized.
We think that the court has jurisdiction of this appeal, although it is from a judgment apparently upon an answer which is in form an answer in abatement. The statute does not give a right of appeal from a judgment upon an answer or plea in abatement. Young v. Providence & Stonington Steamship Co., ante, 550. But whether the answer is in abatement must depend upon the substance, and not upon the form of it. If the answer sets up matter which is not in abatement, but in bar, in which it goes to show that the court has no jurisdiction of the subject matter, it is not an answer in abatement within the meaning of the statute, whatever its form may be; and a defendant cannot give to the Superior Court final jurisdiction of such matter by putting it into the form of an answer in abatement. The matter of the plea is apparent upon the record, and goes to the jurisdiction of the courts of this Commonwealth. If the objection is well founded, the proper way for the defendant to take advantage of it is by motion to dismiss, and, upon suggestion of want of jurisdiction, the court will dismiss the action. Rea v. Hayden, 3 Mass. 24. Lawrence v. Smith, 5 Mass. 362. Watts v. Kinney, 6 Hill, (N. Y.) 82. Niles v. Howe, 57 Vt. 388. Gould, Plead. c. iv. § 24. 1 Chit. Plead. (9th Am. ed.) 442.
We think that the answer was not an answer in abatement, but that, as it appeared that the court did not have jurisdiction of the action, the judgment should have been that the action be dismissed. Action dismissed.