In the process of trajectory optimization for robot manipulator, the path that is generated may deviate from the intended path because of the adjustment of trajectory parameters, if there is limitation of end-effector path in Cartesian space for specific tasks, this phenomenon is dangerous. This paper proposes a methodology that is based on the Pareto front to address this issue, and the methodology takes into account both the multi-objective optimization of robotic arm and the quality of end-effector path. Based on dung beetle optimizer, this research proposes improved non-dominated sorting dung beetle optimizer. This paper interpolates manipulator trajectory with quintic B-spline curves, achieves multi-objective trajectory optimization that simultaneously optimizes traveling time, energy consumption, and mean jerk, proposes a trajectory selection strategy that is based on Pareto solution set by introducing the concept of Fréchet distance, and the strategy enables the end-effector to approach the desired path in Cartesian space. Simulation and experimental results validate the effectiveness and practicability of the proposed methodology on the Sawyer robot manipulator.