Yep, they are the same axle shafts. 27 spline. all the same from an 84 XJ to an 06 TJ. Although the XJ and TJ axles have a 1-piece passenger side axle (no CAD). The TJ axles have a larger u-joint in them, and are commonly used to eliminate the failure prone CAD.
'87 YJ, 4.2L built and bored, 8" of lift, 8.8 rear, AX15/NP 231J, Tom Woods drive shafts, Flat fenders, 12,000LB winch, Custom bumpers, Rattle can paint job. Never completed...