The NBA player then took the mocking one step further ... adding three laughing emojis and writing, "That boy ate some lemon heads before walking into court."
Rittenhouse was on the stand trying to convince a courtroom that he acted in self-defense when he shot at people during an Aug. 2020 protest in Wisconsin.
The teenager -- who's been hit with multiple criminal charges, including two counts of homicide -- said, "I didn't do anything wrong. I defended myself."
Yet at one point during his testimony, he got so emotional trying to explain his actions ... he began sobbing and couldn't get words to leave his mouth.
Rittenhouse broke down in front of the microphone -- forcing a short break in the proceedings -- but James clearly believed it was all a ruse to try to draw sympathy.
The rest of Rittenhouse's hearing, meanwhile, also featured some drama ... with the judge in the courtroom admonishing prosecutors over the way they questioned Rittenhouse.
The officials had asked Rittenhouse about an incident that the judge had previously ruled would not be permitted as evidence ... and after Rittenhouse's attorneys objected, judge Bruce Schroeder exploded.
"You know very well that an attorney can't go into these types of areas when the judge has already ruled without asking outside the presence of the jury to do so," the judge said, accusing the prosecutor of "getting brazen" with him.
"So, don't give me that."
Rittenhouse's attorneys asked for a mistrial over it all.