We investigate the switching current of a Cooper pair transistor with tunable Josephson energy. The junctions are fabricated in a superconducting quantum interference device (SQUID) geometry which allows for an in situ tunable effective Josephson energy by application of a magnetic field. We find a 2e-periodic switching current versus gate charge. As the magnetic field is increased the switching current stays 2e-periodic but the magnitude is suppressed. At a magnetic field of half a flux quantum through the SQUID's the switching current is minimum. We can theoretically model the experimental data by assuming a switching current which is proportional to the ideal critical current squarred. We show that such a dependence is expected in the limit where the effect of thermal fluctuations on the system is strong.