Getting the codes would be a good start. Don't know what model XJ you have but have a look at the following link that will explain how to get the trouble codes from your dash. Either by counting the check engine light flashes on older XJ's or the number showing in the odometer on newer ones.
It doesn't work on 98-99 and some 00 TJ Wranglers so I don't know if it will work on XJs of those years either.
http://allpar.com/fix/80s-codes.html