We investigate the dc current-voltage characteristics of d-wave Josephson junctions, where the barrier at the interface may have arbitrary strength. Dividing the current into n-particle currents In (n integer), we can explicitly show which physical processes are responsible for the subharmonic gap structure (SGS). For orientations where midgap states (MGS) exist, the resonances in the n-particle processes are drastically changed, giving rise to a strongly modified SGS. Introducing broadening in a phenomenological way, we show that MGS may produce a current peak near zero bias and we explain which physical processes are contributing to this peak. The agreement of our theory with recent experiments is discussed.