
873 So.2d 1252 (2004)
L.L.H., a child, Appellant,
v.
STATE of Florida, Appellee.
No. 5D03-3218.
District Court of Appeal of Florida, Fifth District.
May 28, 2004.
*1253 James B. Gibson, Public Defender, and Leonard R. Ross, Assistant Public Defender, Daytona Beach, for Appellant.
Charles J. Crist, Jr., Attorney General, Tallahassee, and Lamya A. Henry, Assistant Attorney General, Daytona Beach, for Appellee.
PLEUS, J.
The defendant, L.L.H., a juvenile, appeals from an order granting the State's motion to vacate his plea and terminating juvenile proceedings. The trial court ruled the defendant's guilty plea must be set aside as the court lacked subject matter jurisdiction because no delinquency petition had been filed charging a juvenile offense.
The defendant was taken into custody as a result of an order to take into custody issued by the juvenile court pursuant to an arrest affidavit. This order gave as the reason "trafficking in cocaine." The defendant was taken into custody, held in secure detention pursuant to a detention order signed by the juvenile court judge, and at a pre-trial conference, pled guilty. The court accepted the plea and ordered the case set for disposition.
Prior to disposition, the State, which had direct filed on the charge against the defendant, filed a motion to vacate the plea and terminate juvenile proceedings. According to the State, since no delinquency petition had been filed, the juvenile court was without jurisdiction to accept the plea and prosecution was proper in adult court.
The trial court agreed, ruling that under the juvenile rules, a plea cannot be entered and accepted until a delinquency petition is filed. The court found that the only papers that had been filed were those that dealt with the detention status of the juvenile. The court ruled it lacked jurisdiction to accept the plea and ordered the plea set aside and the juvenile proceedings terminated given that the State had direct filed.
While conceding that no petition for delinquency had been filed, the juvenile defendant asserts that the juvenile court had jurisdiction over him and that jeopardy attached when the juvenile court accepted his guilty plea, thus precluding the court from vacating said plea. See Pettis v. State, 803 So.2d 903, 904 (Fla. 1st DCA 2002) (jeopardy attached when the trial court unconditionally accepted defendant's nolo contendere plea pursuant to plea bargain).
*1254 If the juvenile defendant was placed in jeopardy in the juvenile court, then the defendant could not be subsequently tried for the same offense as an adult. See Breed v. Jones, 421 U.S. 519, 95 S.Ct. 1779, 44 L.Ed.2d 346 (1975); Williams v. State, 742 So.2d 496 (Fla. 1st DCA 1999).
In a criminal context, subject matter jurisdiction is determined by the charge made in an indictment or information. State v. Vazquez, 450 So.2d 203 (Fla. 1984); Pope v. State, 268 So.2d 173 (Fla. 2d DCA 1972). Thus a criminal prosecution presupposes the existence of a valid charging document and such an accusatory pleading in some form is an essential requisite of jurisdiction which cannot be waived. State v. Anderson, 537 So.2d 1373 (Fla.1989); Caves v. State, 303 So.2d 658 (Fla. 2d DCA 1974). A judgment of conviction prior to presentment of a charging document is void because the court lacks subject matter jurisdiction. Chapman v. Stubbs, 109 Fla. 192, 147 So. 227 (1933).
The defendant relies on case law holding that in a juvenile context, the juvenile court acquires jurisdiction at the moment the juvenile is taken into custody. See D.C.W. v. State, 445 So.2d 333 (Fla.1984). In this case, the defendant was taken into custody when he was arrested pursuant to an arrest affidavit prepared by a police officer and the order to take into custody issued by the juvenile court. The defendant points out that section 985.219(8), Florida Statutes, provides:
The jurisdiction of the court shall attach to the child ... when the child is taken into custody with or without service of summons and before or after the filing of a petition whichever first occurs, and thereafter the court may control the child and the case in accordance with this part.
The juvenile court's jurisdiction over the person of the child attaches when the child is taken into custody but a delinquency charge does not exist until a petition is filed. As the State points out, Florida Rule of Juvenile Procedure 8.030(a), governing commencement of formal proceedings, provides in relevant part that "[a]ll proceedings shall be initiated by the filing of a petition by a person authorized by law to do so." Williams v. State, 742 So.2d 496 (Fla. 1st DCA 1999), reflects this requirement. In Williams, the First District held that a document entitled "direct-issue capias" set out under oath in the name of the state attorney, signed by an assistant state attorney and filed with the clerk, in which the state attorney alleged that the juvenile committed armed robbery, functioned as a petition for delinquency, conferring jurisdiction on the juvenile court to accept the juvenile's plea of nolo contendere, to which jeopardy then attached.
In the instant case, no charging petition, whether labeled a delinquency petition or direct issue capias, prepared by a person authorized by law to do so, was filed prior to the time the defendant tendered his plea. The defendant's claim that a detention affidavit filed by the Department of Juvenile Justice as a predicate for entry of the detention order is sufficient is without merit. The detention affidavit does not identify the specific charge against the defendant. It relates to the authority of the juvenile court to detain the juvenile pending the filing of formal charges. The trial court did not err in vacating the defendant's plea where no charging document had been filed against the defendant by a person authorized by law to do so.
AFFIRMED.
GRIFFIN and PALMER, JJ., concur.
