Coastie is correct. Unless the XJ you are installing the front DS in (as a rear DS) is a manual, in which case you want a V8 auto ZJ front driveshaft. If you have a lot of lift and a manual you may want an I6 ZJ front driveshaft as it is slightly over 2" longer, but I'm not sure - check that info yourself.
Lengths for ZJ front driveshafts, from Dana-Spicer catalog (if anyone has a copy of the Dana-Spicer rear driveshaft catalog, I would be much obliged! I only have the front DS catalog):
96 w/ 4.0 or 2.5, Manual & 231 TC: 28.02"
92.5-95 w/ 4.0 Manual & 231 TC: 28.02"
96.5-97 w/ 2.5 Manual & 231 TC: 29.02"
96-98 w/ 5.2/5.9 Auto & 249 TC: 29.6"
93-95.5 w/ 4.0 Auto & 231 or 242 or 249 TC: 30.53"
92.5-93 w/ 4.0 AW4 & 231/242/249 TC: 30.53"
96.5-97 w/ 4.0 Auto & 249 TC: 31.53"
97-98 w/ 4.0 Auto & 242 TC: 31.75"
96 w/ 4.0 Manual & 242 TC: 31.77"
93-95.5 w/ 5.2 Auto & 231 or 249 TC: 32.87"
These are ordered from shortest to longest for convenience... if you can fill in these blanks with measurements from junkers or something, maybe we should make a FAQ or sticky about it or something with all the ZJ front driveshaft lengths in one place:
96.5-97 w/ 5.2 Auto & 249 TC: ???
95.5-96 w/ 4.0 Auto & 249 TC: ???
96 w/ 5.2 Auto & 249 TC: ???
95.5-96 w/ 4.0 Auto & 249 TC: ???
95.5 w/ 5.2 Auto & 249 TC: ???