David L. Smith also was fined $2,500 by state Superior Court Judge Lawrence M. Lawson.
On Wednesday, Smith was sentenced to 20 months in a federal prison on a federal charge of knowingly spreading a computer virus. Lawson on Friday upheld a plea deal allowing the state term to end when the federal term does. That means the actual 10-year state term will end in 20 months along with the federal sentence.
Smith, 34, could have received up to five years in prison on the federal charge, but U.S. prosecutors suggested a term of about two years, noting his "extensive assistance" in the three years since his arrest. Authorities provided no specifics this week about his cooperation.
Smith was also fined $5,000 by the federal court.
Defense attorney Edward F. Borden Jr. said Smith helped thwart and prosecute virus creators, preventing "very large potential losses."
"Melissa" struck thousands of e-mail systems on March 26, 1999, disguised as an "important message" from a friend or colleague, and spread around the world like an electronic chain letter.
Melissa was relatively benign compared with viruses that delete computer files or do other damage. Yet by clogging e-mail systems and causing some to crash, Melissa was the worst computer virus outbreak ever at the time.
Smith, a computer programmer, was arrested on April 1, 1999, at his brother's home in Eatontown, after investigators for America Online, the Internet provider, contacted state authorities with evidence that helped trace the virus to Smith's phone number.
Few people have ever been prosecuted for creating computer viruses.
A federal judge in Syracuse, New York, in 1990 sentenced Robert T. Morris to three years probation for a worm virus that crashed 6,000 computers in 1988. Morris was the first person convicted under the 1986 Computer Fraud and Abuse Act.
A British judge in 1995 sentenced Christopher Pile to 18 months in jail for creating computer viruses that destroyed files around that nation. Pile, who called himself the Black Baron, was the first person convicted under Britain's Computer Misuse Act of 1990.
But prosecutors in the Philippines had to dismiss all charges against a man accused of releasing the "Love Bug" virus in 2000 because of a lack of applicable laws.