  We derive microscopically the dynamics associated with the d.c. Josephson
effect in a superconducting tunnel junction interacting with an arbitrary
electromagnetic environment. To do so, we extend to superconducting junctions
the so-called P(E) theory (see e.g. Ingold and Nazarov, arXiv:cond-mat/0508728)
that accurately describes the interaction of a nonsuperconducting tunnel
junction with its environment. We show the dynamics of this system is described
by a small set of coupled correlation functions that take into account both
Cooper pair and quasiparticle tunneling. When the phase fluctuations are small
the problem is fully solved self-consistently, using and providing the exact
linear admittance Y({\omega}) of the interacting junction.
