An arrangement in a rock drilling machine and to a method of mounting the same, the rock drilling machine including a gear module and a percussion module, which are arranged on a same axial line. The modules are pressed towards each other by several first connecting devices and several second connecting devices. The connecting devices generate first axial connecting forces and second axial connecting forces, which receive axial operational forces of the rock drilling machine. The second connecting devices also fasten the rock drilling machine to a carriage provided with support surfaces.