We study the Josephson current through a superconducting or normal gra
in coupled by two tunnel junctions to macroscopic superconducting lead
s and capacitively to a gate. For a superconducting grain the critical
Josephson current has a threshold behavior - due to the Coulomb block
ade - when the superconducting gap Delta is suppressed below the charg
ing energy E(C) by a magnetic field. This effect is a direct consequen
ce of a discrimination by the superconducting ground state between odd
and even number of electrons on the grain. The critical current is pe
riodically modulated by the gate voltage; it is 2e-periodic in the gat
e-induced grain charge if Delta > E(C), but tends to become e-periodic
as Delta --> 0. In the intermediate region the gate-modulated critica
l current develops a double-peak structure; the gap between peaks incr
eases as Delta decreases. If the gap energy on the grain Delta(g) is s
maller than in the leads, the Josephson current is reduced, but reache
s a finite, temperature dependent asymptotic value corresponding to a
normal grain if Delta(g) --> 0.