Understanding chondrule formation provides invaluable clues about the origin of the solar system. Recent studies suggest that planetesimal collisions and the resulting impact melts are promising for forming chondrules. Given that the dynamics of planetesimals is a key in impact-based chondrule formation scenarios, we here perform direct $N$-body simulations to examine how the presence of Jupiter affects the properties of chondrule-forming collisions. Our results show that the absence/presence of Jupiter considerably changes the properties of high velocity collisions whose impact velocities are higher than 2.5 km s$^{-1}$; high velocity collisions occur due to impacts between protoplanets and planetesimals for the case without Jupiter; for the case with Jupiter, eccentricities of planetesimals are pumped up by the secular and resonant perturbations from Jupiter. We also categorize the resulting planetesimal collisions and find that most of high velocity collisions are classified as grazing ones for both cases. To examine the effect of Jupiter on chondrule formation directly, we adopt the impact jetting scenario and compute the resulting abundance of chondrules. Our results show that for the case without Jupiter, chondrule formation proceeds in the inside-out manner, following the growth of protoplanets. If Jupiter is present, the location and timing of chondrule formation are determined by Jupiters eccentricity, which is treated as a free parameter in our simulations. Thus, the existence of Jupiter is the key parameter for specifying when and where chondrule formation occurs for impact-based scenarios.