Some maths, the energy required to launch your ball is E=mgh (mass*gravity*height) = 0.2*9.81*0.3 = 0.6 Joules. A 10,000μF capacitor charged to 12V will hold 0.5* 0.01*12^2 = 0.72 Joules. Charged to 24V is 4 times as much = 2.8 Joules. However, as pointed out by MikeMI above, the problem is getting the energy into the solenoid quick enough. To calculate time available we need the launch speed, (from E=0.5*m*v^2) V = sqrt(0.6/0.2/0.5) = 2.5 m/s. Assuming a stroke of 5cm then the time available is (distance/average speed) t = (0.05/1.25) = 0.04 seconds.
So, something like a 10,000μF capacitor charged to somewhere between 12 and 24 volts will probably do the job. Personally, I'd get a capacitor and a lab supply and charge to different voltages to find the voltage that works. Note, in Mike's traces above the energy is the area under the curve up to 40mS. With the traces in mind the capacitance probably should be around 20,000μF.
Edit corrected the maths.
Mike.