We fabricated Josephson junctions using an Al/Ta/Nb structure for x-ray detection. We selected a Ta layer to be the absorber of quasiparticles generated by incident x rays to the junction because of the long lifetime of quasiparticles and the absorption efficiency for x rays. A Nb layer served not only as a barrier for quasiparticle rejection, but also as a buffer layer for deposition of a body centered cubic Ta layer without heating during deposition. An Al layer acted as not only an overlayer for the formation of the AlOx barrier, but also as a layer for quasiparticle trapping. The Nb/AlOx-Al/Ta/Nb junction showed excellent current-voltage characteristics.