  We propose a scheme to implement the two-qubit quantum phase gate with
Josephson-junction charge qubits in a thermal cavity. In this scheme, the
photon-number-dependent parts in the time evolution operator are canceled at
the special time. Thus the scheme is insensitive to the thermal field. We also
demonstrate that the scheme can be used to generate maximally entangled state
of many Josephson-junction charge qubits
