
204 Va. 851 (1964)
W. K. CUNNINGHAM, JR., SUPERINTENDENT, ETC.
v.
CARL HAYES.
Record No. 5674.
Supreme Court of Virginia.
January 20, 1964.
Reno S. Harp, III, Assistant Attorney General (Robert Y. Button, Attorney General,    on brief), for the plaintiff in error.
Arlin F. Ruby (Lewis T. Booker,    on brief), for the defendant in error.
Present, Eggleston, C.J., and Buchanan, Whittle, Snead, I'Anson and Carrico,
1.  Though prosecuted on a short-form indictment for manslaughter Hayes was convicted of first degree murder and sentenced to life imprisonment.  After serving five years, the maximum term for manslaughter, he sought his freedom by
habeas corpus    proceedings on the ground the trial court lacked jurisdiction to impose the longer sentence.  On appeal by the state from an order directing Hayes' release it was held, however, that if the court has jurisdiction of the person and of the subject matter and the punishment is of the type prescribed by law,    habeas corpus    does not lie because of defects in the sentence but the remedy is by appeal; that the requirement of an indictment is not jurisdictional but statutory merely, and that an error in sentence does not make it subject to collateral attack.
2.  It was clear from the record that the court, the attorneys, and Hayes himself thought the trial was one for murder.  His only contention when unsuccessfully seeking a writ of error was that his conviction was contrary to the evidence.  Since he knew the cause and nature of the accusation against him and failed at trial or on appeal to question the sufficiency of the indictment and since the judgment of the trial court was voidable merely Hayes could not later attack it collaterally by    habeas corpus.
Error to a judgment of the Hustings Court of the city of Richmond, Part II. Hon. M. Ray Doubles, judge presiding. The opinion states the case.
SNEAD
SNEAD, J., delivered the opinion of the court.
This appeal resulted from the entry of an order, upon a writ of *852  habeas corpus    issued, directing W. K. Cunningham, Jr., Superintendent of the Virginia State Penitentiary, to release from his custody Carl Hayes, who is being detained on a judgment order of the Circuit Court of Mecklenburg County entered October 29, 1957, whereby Hayes was sentenced to life imprisonment on a conviction of murder in the first degree.
On May 17, 1962, Hayes filed a petition for a writ of    habeas corpus    in the Hustings Court of the City of Richmond, Part II, wherein he asserted that his detention was illegal.  He alleged, among other things, that he was indicted and arraigned on the charge of manslaughter to which he pleaded not guilty; that the jury by their verdict found him guilty of murder in the first degree and fixed his punishment at confinement in the penitentiary for life, and that the court sentenced him in accordance with the verdict.  Hayes further alleged that the conviction for murder and the sentence imposed were illegal because he was indicted and tried for manslaughter and not for murder; that the portion of his sentence exceeding 5 years (the maximum for manslaughter) was void as being excessive, and that since he had served 5 years, allowing time off for good behavior, he was entitled to be released.
The trial court directed the respondent, Cunningham, to show cause why a writ should not be issued returnable to that court.  Cunningham asserted in his answer that the petition for a writ of    habeas corpus    presented a case for the determination of unrecorded matters of fact pertaining to Hayes' trial and conviction in the Circuit Court of Mecklenburg County, and that the Hustings Court of the City of Richmond, Part II, was without jurisdiction to issue the writ returnable to it, but should issue the writ returnable to the Mecklenburg Circuit Court as provided by | 8-598, Code 1950, as amended.
At the same time he filed his answer, the respondent filed a motion to dismiss the petition on the grounds that subsequent to Hayes' trial and conviction of murder in the first degree a petition for a writ of error filed by Hayes was denied by this court; that the questions raised in the petition for a writ of    habeas corpus    could have been raised in his petition for a writ of error, and that    habeas corpus    cannot be substituted for an appeal.
The trial court directed the respondent to state with particularity what unrecorded matters of fact were presented by the pleadings.  In his amended answer he asserted,    inter alia,    that if Hayes did not understand the nature of the charge pending against him in the Mecklenburg court at the time of his trial a question was presented *853 for the determination of certain unrecorded matters of fact.  The respondent renewed his motion to dismiss.
The court ruled that it had not been shown what unrecorded matters of fact were presented either by the petition or by the pleadings filed by the respondent; that Hayes was not claiming the indictment was not clear and specific or that he did not understand the nature of the charge pending against him, but relied solely on the record, and that in the amended answer respondent was not relying upon any unrecorded matters of fact as a defense.  The trial court issued a writ of    habeas corpus    returnable before it and counsel was appointed to represent Hayes in the proceedings.  After hearing argument of counsel on the return day, the court took the matter under advisement.
Later, in a letter opinion, the court ruled that the judgment of the Mecklenburg court convicting and sentencing Hayes for murder in the first degree was void as to so much thereof as exceeded a conviction for manslaughter, and that Hayes having served the maximum punishment fixed for manslaughter was entitled to his release.  An order was entered directing Cunningham to release Hayes from custody, and we granted Cunningham a writ of error.
Cunningham has resolved his assignments of error into these questions for determination:
"1.  Did the Court err in failing to dismiss the petition on the ground that the question of the sufficiency of the indictment was one to be raised upon a direct appeal of the petitioner's conviction, and could not be raised by way of a petition for habeas corpus?"
"2.  Did the Court err in failing to issue a writ of habeas corpus returnable to the Circuit Court of Mecklenburg County, Virginia, for a hearing, for the reason that the petition presented a case for the determination of certain unrecorded matters of fact relating to a proceeding which took place in that court?"
"3.  Did the Court err in holding that the petitioner was serving a valid conviction for manslaughter and in the form of the relief granted?"
  The pertinent part of the indictment reads:
"The jurors of the Commonwealth of Virginia, in and for the body of the County of Mecklenburg, and now attending the Circuit Court, at its August term, 1957, upon their oath present that Carl Hayes heretofore, to-wit, on the 20th day of June, in the year one thousand nine hundred and fifty-seven, in the County of Mecklenburg, and within the jurisdiction of the said Circuit Court of the County of *854 Mecklenburg,    feloniously and unlawfully did kill and slay"
one Whaley Shelton, against the peace and dignity of the Commonwealth." (Italics supplied)."
As the court below stated, this indictment was a valid indictment charging manslaughter.  It conforms to the short form indictment "deemed sufficient" and prescribed in | 19.1-166 of the Code.  The short form indictment for the offense of murder is also set forth in this section.  the form for the indictment for manslaughter reads "* * * feloniously and unlawfully did kill and slay * * *", whereas the form for murder reads "* * * feloniously did kill and murder * * *". This is the only difference between the two forms of indictment.
Cunningham contends that the sufficiency of the indictment should have been raised on direct appeal and cannot be raised by way of a petition for a writ of
habeas corpus,    and that the court below erred in not sustaining his motion to dismiss the petition.  On the other hand Hayes argues that no attack is being made upon the validity of the indictment.  He admits that it is a valid one for manslaughter.  He takes the position that he is attacking the court's order sentencing him to the penitentiary for more than 5 years, because it lacked jurisdiction to impose a greater penalty on the charge of manslaughter upon which he was arraigned, pleaded not guilty to and was tried.  Thus, he contends his constitutional rights have been violated.
"This court has repeatedly held that a writ of    habeas corpus    does not lie where the judgment of conviction is merely voidable by reasons of error of law or fact, omissions, or other irregularities, no matter how numerous or flagrant they may be.  The remedy in such cases is by appeal or writ of error. The underlying question in such proceedings is that of jurisdiction -- that is, whether the court had jurisdiction of the person and the subject matter and the power to render the particular judgment.  If the court had jurisdiction of the person and of the subject matter of the prosecution, and if the punishment imposed is of the character prescribed by law, a writ of    habeas corpus does not lie to release the prisoner from custody merely because of irregularities or defects in the sentence."  (Citing cases).     Royster Smith,    195 Va. 228, 232-3, 77 S.E.2d 855.  See also    Ex parte Belt,    159 U.S. 95, 15 S.Ct. 987, 988, 40 L.ed. 88, 90.
In Virginia there is no constitutional requirement that prosecutions for felonies be by indictment.  The requirement is merely statutory and may be waived by the accused.  | 19.1-162, Code of 1950, as *855 amended.     Council
Smyth,    201 Va. 135, 138-9, 109 S.E.2d 116,    Hanson     Smyth,    183 Va. 384, 390, 32 S.E.2d 142.
In    Pine     Commonwealth,    121 Va. 812, 834-5, 93 S.E. 652, we said:
"While the Constitution guarantees to every man the right to demand 'the cause and nature of his accusation' [Constitution of Virginia, Art. 1, | 8], it does not prescribe the manner in which this demand shall be complied with.  It does not require that it shall be by indictment or any other prescribed manner. It may be by presentment or information, or any other manner the legislature may provide.  Furthermore, the right guaranteed by the Constitution is the right to demand 'the cause and nature of his accusation'.  If he does not choose to demand it, he is under no obligation to do so.  It is a right that he may waive if he chooses, and which he will be held to have waived unless he asserts it."
Since a person charged with a felony may waive indictment and be tried on a warrant or information the requirement of an indictment is not jurisdictional.
Hanson     Smyth, supra,    183 Va. at p. 390.     Habeas corpus    does not lie for errors or irregularities that are not jurisdictional.     Council Smyth, supra,    201 Va. at p. 139.  The remedy for irregularities, errors or defects in orders or judgments is by writ of error or appeal.  Relief by habeas corpus    is confined to those cases where the judgment is void and not voidable.     Smyth     Bunch,    202 Va. 126, 131, 116 S.E.2d 33, cert. den. 364 U.S. 935, 81 S.Ct. 382, 5 L.ed.2d 366.
In 25 Am. Jur., Habeas Corpus, | 42.1 p. 29, 1963 Cum. Supp., it is said:
"In some cases where a defendant, upon his plea of guilty or after trial, has been convicted of an offense other than one charged, habeas corpus has been allowed upon the theory that the defect goes to the jurisdiction of the court rendering the judgment and makes it absolutely void.  But in other cases involving this situation, habeas corpus has been denied upon the theory that, the defect not being jurisdictional,    the judgment of conviction is not void. This conflict seems primarily due to a difference of opinion as to whether, to render a defect jurisdictional, the court must have been without power of rendering a judgment of the same type as the one in issue, or whether it need only have been without power to render the particular judgment in issue." (Italics supplied).  See also 154 A.L.R. 1135.
In    People ex rel. Wachowicz     Martin,    293 N.Y. 361, 57 N.E.2d *856  53, it was held that where proceedings are commenced by an indictment and the trial court has jurisdiction of the accused, of the crime charged and of the crime the accused is found guilty of, the judgment entered convicting the accused of a crime for which he is not charged, although erroneous and reversible on appeal, is not a nullity and therefore cannot be challenged by a writ of    habeas corpus.  Paterno     Lyons,    334 U.S. 314, 68 S.Ct. 1044, 92 L.ed. 1409;    People ex rel. Tracher     Martin,    268 App.Div. 955, 51 N.Y.S.2d 676.  See also    Martin     United States,    168 F.2d 1003 (4th C.C.A. 1948);    Byars     Warden of Maryland Penitentiary,    196 Md. 681, 77 A.2d 18;    Meeks     Lainson,    246 Iowa 1237, 71 N.W.2d 446, 448.
In    Barnes     Hunter,    188 F.2d 86, 89, 90, it is said:
"The elements of the offense sought to be charged by an indictment or information, the sufficiency of the plea or proof to support the judgment of conviction, the construction to be placed upon the indictment or information, and the sufficiency of the charge are all matters, the determination of which rest primarily with the sentencing court.  If it errs in determining them, its judgment is not for that reason void.  * * *"
"The rationale of the rule is that when the offense is one over which the court has jurisdiction and the court acquires jurisdiction of the person of the defendant, it has jurisdiction and power to determine the elements which constitute the offense and the sufficiency of the indictment, and such jurisdiction necessarily embraces the power to make an erroneous, as well as a correct decision.  Hence its decision, whether right or wrong, is not open to collateral attack.  * * *."
  Here, the record shows that the trial proceeded upon the theory that Hayes was actually being tried for murder even though the indictment was a defective one for that charge.  It recited "kill and slay" instead of "kill and murder".  Unquestionably the trial court had jurisdiction to try a person for either manslaughter or murder.  On the back of the indictment were these words: "INDICTMENT FOR A Felony -- Murder."  The caption of the court orders reads: "Felony -- Murder".  The order entered on the first day of the trial reads: "This day came the Attorney for the Commonwealth and Carl Hayes, who stands indicted for a felony, to-wit:  murder * * *."  The order of conviction reads: "This day came again the Attorney for the Commonwealth and the accused, Carl Hayes, who is on trial for a felony (murder) * * *."
Cunningham, in his motion to dismiss the    habeas corpus    proceeding,  *857 made reference to Hayes' petition for a writ of error to his said conviction which was denied by this court on April 24, 1958.     Hayes Commonwealth,    199 Va. lxxv.  It is well settled in our jurisdiction that an appellate court will take judicial notice of its own records.     West     L. Bromm Baking Co.,    166 Va. 530, 536, 186 S.E. 291; 7 M.J., Evidence, | 14, p. 346 and cases therein cited.  See also 31 C.J.S., Evidence, | 50, p. 619    et seq.     Hayes was represented by counsel during his trial and with regard to his appeal.  The sole assignment of error was:  "The court erred in refusing to strike the evidence upon the ground that it did not show the guilt of the accused beyond a reasonable doubt, and in refusing to set aside the verdict of the jury as contrary to the law and the evidence and without evidence to support it."  In his petition for a writ of error, under the statement of proceedings in the lower court, this is said:  "Carl Hayes was indicted for the murder of Whaley Shelton by a Grand Jury on August 19, 1957."  Thus, it is clear that the court, the attorney for the Commonwealth, Hayes and his counsel understood that the trial was for murder.
In    Commonwealth     Beavers,    150 Va. 33, 142 S.E. 402, Beavers contended that his conviction was void because he had been indicted for a misdemeanor but tried and convicted for a felony.  The record showed that the grand jury which returned the indictment intended to charge a felony, and that the court, the Commonwealth's attorney and the defense attorney all proceeded upon the theory that the charge and trial were for a felony.  Beavers had been duly arraigned as in a felony case, a felony jury had been impanelled, a verdict and judgment for a felony had been rendered and a writ of error had been unsuccessfully prosecuted.
We held that the action of the trial court amounted to a judicial determination, acquiesced in by all parties, that Beavers was charged with a felony and not a misdemeanor; "an error, perhaps, but one which rendered the judgment voidable and not void, under the peculiar facts of this case, and one which was subject to correction only upon writ of error."  We concluded that Beavers was "charged with a felony, tried for a felony, sentenced for a felony, and he was guilty of a felony, and the order of the Circuit Court * * * in discharging him from custody [on    habeas corpus   ] was erroneous and should be reversed."  150 Va. at pp. 38, 41.
Here Hayes knew "the cause and nature of his accusation" and raised no question during his trial or on appeal from his conviction as to the sufficiency of the indictment.  The contention was made *858 for the first time in these collateral proceedings.  As we said in the    Beavers    case, an accused in a criminal proceeding "cannot after his cause has been heard in the trial court and appellate court, assume a position thereafter inconsistent with the position he assumed in those courts."  150 Va. at p. 38.
It cannot be said that the indictment charged no offense at all under the laws of this Commonwealth.  It did charge Hayes with committing a felony and, as has been said it was a valid indictment for the crime of manslaughter.  He says that he is not attacking the indictment but contends that his sentence in excess of 5 years is void.  However, in effect he is attacking the sufficiency of the indictment to support the conviction for murder and the sentence imposed.
In support of his position, Hayes cites    Crutchfield     Commonwealth, 187 Va. 291, 46 S.E.2d 340, but that case is not controlling here.  There, the accused was indicted for malicious wounding under the Maiming Act.  Upon recommendation of the Commonwealth's attorney the court permitted him to plead guilty to "unlawful assault", a misdemeanor.  However, the court found the accused guilty of "unlawful wounding", a felony, and fixed his punishment at 3 years in the penitentiary.  No appeal was taken, but later on    habeas corpus
filed in another court, the Superintendent admitted the invalidity of the sentence imposed and the court declared it void.  Whereupon the accused was returned to the sentencing court.  Over the objection of the accused, the court declared the original proceedings null and void and ordered that the accused be placed on trial upon the same indictment.  At this trial the accused was found guilty of "unlawful wounding" by a jury and his punishment was fixed at 4 years in the penitentiary.
On appeal we held, among other things, that since the trial court accepted the plea of guilty to unlawful assault, a misdemeanor, this was the equivalent of a conviction of the offense to which it was directed; that the sentence imposed was in excess of that prescribed for unlawful assault, and that the excess was invalid.  The judgment was reversed and the case was remanded with direction to impose a valid sentence on the misdemeanor of which he had been convicted in the original trial.  It will be observed that there was a variance between the conviction and the sentence.  In the case at bar Hayes was convicted of murder and was sentenced to life imprisonment for that offense.  There existed no such variance as existed in the    Crutchfield    case.  Moreover, in the present case Hayes pleaded not guilty.  *859 
Other cases relied on by Hayes to support his contention that he cannot be convicted and sentenced for an offense higher than that charged in the indictment do not involve    habeas corpus    but are direct, as opposed to collateral, attacks by appeal, writ of error or    certiorari.     The only habeas corpus    cases Hayes cites besides    Crutchfield     Commonwealth, supra,    are    State     Hare,    243 N.C. 262, 90 S.E.2d 550 and    State Emsweller,    78 W.Va. 214, 88 S.E. 787 which are not factually in point.  In the    Hare    case the accused pleaded guilty to one crime and was convicted of another.  In the    Emsweller    case the accused pleaded guilty to a warrant that charged no offense at all so that there could be no valid conviction of any crime.
Our conclusion is that the judgment of the Circuit Court of Mecklenburg convicting and sentencing Hayes to life imprisonment for murder in the first degree is not void.  It is merely voidable.  That being the case    habeas corpus    does not lie.  The remedy in such cases is by a writ of error.
In    Brown     Allen,    344 U.S. 443, 541, 73 S.Ct. 397, 427, 97 L.ed 469, 533, Mr. Justice Jackson said in concurring opinion:
"* * * No state is obliged to furnish multiple remedies for the same grievance.  Most states, and with good reason, will not suffer a collateral attack such as habeas corpus to be used as a substitute for or duplication of the appeal.  A state properly may deny habeas corpus to raise either state or federal issues that were or could have been considered on appeal.  * * *." Council     Smyth, supra,    201 Va. at p. 140.
The trial court erred in denying Cunningham's motion to dismiss.  Having taken this view of the case, it is unnecessary to discuss other questions raised.
Accordingly, the judgment appealed from is reversed and the writ of habeas corpus ad subjiciendum    is dismissed.
Reversed and dismissed.
