In the quadri-dimensional space-time, the variation of Hamilton's action is a powerful tool to study the process equations for conservative fluid media. In this framework, Hamilton's principle allows to obtain equation of motions, equation of energy but also Rankine-Hugoniot conditions. The variational method may be a versatile key to obtain the shock-wave conditions for complex media when the equations of processes are not expressed by linear or quasi-linear differential equations.