My kid's 97 had issues for over a year. I tested, replaced every sensor, cable, ground I could find. Changed out the computer. Sometimes it would throw codes, sometimes not. It ran well for a year after a week of work, and $800 in parts, and then started crapping out. For the entire time, to make it start quickly, you had to depress the accelerator once before starting. This last summer when it was crapping out, stepping on the brake would cause it to die. Changed out the vacuum booster, no change. It threw a 700 code or two, changed the NSS. No change. Pulled off the aftermarket cruise control. Some improvement. Tranny shop used their reader on a test drive. Concluded it was the engine. Took to the electrical genius in town. He replaced the fuel pump. It made it drive better, but stepping on the brake still killed it. He finally traced it down to a bad ground in the tail light that the engine management system was using for a ground. According to the Mitchell repair schematic, pins a31, and a32 at the ecm connector should go to ground. I checked them, and one had a fairly low resistance, and the other was either open or somewhat high resistance. I piggy backed backed grounds to the wires on those pins on the connector and ran the grounds to the firewall. The mitchell schematic shows these grounds on the firewall, but none of the 97's I've looked at have had them. The mechanics newer 4.0 LJ did have those grounds on the firewall. :dunno:
Anyway, it now starts like a 4.0 without touching the accelerator. It only took a couple of grand, two weeks of my time, and four visits to three of the best professional mechanics in town so his $1200 XJ runs.