The formation of giant planets is explained by the nucleated instability mo
del, in which a solid core captures a large amount of nebular gas when it g
rows to critical core mass. It is well known that critical core mass scarce
ly depends on the boundary conditions of the envelope, i.e., its distance f
rom the central star and the density and temperature of the nebular gas. Ho
wever, this is not the case when the envelope is wholly convective. Such a
situation is realized if we consider the formation of giant planets close t
o central stars and/or in dense cool nebulae. In the present study, we exte
nsively investigate the dependence of the critical core mass on the distanc
e from the central star and on the density and temperature of the nebular g
as; we found that the critical core mass reduces to 2-3 M (+) at 0.1 AU in
dense nebulae with a surface density about 20 times larger than that in the
minimum-mass solar nebula model. This result suggests a possibility of in
situ formation of the detected extrasolar giant planets close to the centra
l stars.