  We show that a Josephson current flowing through a
ferromagnet-normal-metal-ferromagnet trilayer connected to two superconducting
electrodes induces an equilibrium exchange interaction between the magnetic
moments of the ferromagnetic layers. The sign and magnitude of the interaction
can be controlled by the phase difference between the order parameters of the
two superconductors. We present a general framework to calculate the Josephson
current induced magnetic exchange interaction in terms of the scattering
matrices of the different layers. The effect should be observable as the
periodic switching of the relative orientation of the magnetic moments of the
ferromagnetic layers in the ac Josephson effect.
