During their early formation stages, massive stars are surrounded by accretion disks and launch powerful magnetically-driven jets and molecular outflows. We performed simulations of the formation of a massive star, starting from the gravitational collapse of a slowly-rotating cloud core of 0.1 pc in size, with the methods of resistive magnetohydrodynamics, radiation transport and self-gravity. We explored a range of cloud masses (50-200), and natal environments with different initial density and angular momentum distributions and magnetic field strengths. Thanks to the axisymmetrical grid utilized, we were able to resolve the innermost ~100 au away from the protostar, and thus study the physical processes that intervene in the launching, acceleration, propagation and termination of protostellar jets. Recent observations of the disk-jet system in the massive star forming region 21078+5211 have shown water masers tracing individual streamlines of the jet emerging from the accretion disk with unprecedented detail. We compared the results of the simulations to the water maser observations finding a good match in the kinematics. This contribution is based on the articles Oliva & Kuiper 2023 (A&A, 669, A81), and Moscadelli et al. (2022, Nature Astron., 6, 1068).