Hi there, I had a VF750 Honda that did the same thing on me one night, more than a bit scary! After getting the bike home, fuses were checked, battery ok, start looking! Fortunately I started looking at the wires and connections on the ignition switch and what do you know two wires broken about on inch below the switch. The problem was caused by the fact that the ignition switch was mounted on the top yoke and what with age and side to side movement the wires had broken. Repair done, everything working, we're away again. Could be worth checking that area on your XJ. Good luck. Cheers, Dave