  The microscopic theory of current carrying states in the ballistic superconducting microchannel is presented. The effects of the contact length L on the Josephson current are investigated. For the temperatures T close to the critical temperature T_c the problem is treated selfconsistently, with taking into account the distribution of the order parameter $\Delta (r)$ inside the contact. The closed integral equation for $\Delta $ in strongly inhomogeneous microcontact geometry ($L\lesssim \xi_{0}, \xi_{0}$ is the coherence length at T=0) replaces the differential Ginzburg-Landau equation. The critical current $I_{c}(L)$ is expressed in terms of solution of this integral equation. The limiting cases of $L\ll \xi_{0}$ and $L\gg \xi_{0}$ are considered. With increasing length L the critical current decreases, although the ballistic Sharvin resistance of the contact remains the same as at L=0. For ultra short channels with $L\lesssim a_{D}$ ($a_{D}\sim v_{F}/\omega_{D}, \omega_{D}$ is the Debye frequency) the corrections to the value of critical current I_c(L=0) are sensitive to the strong coupling effects. 
On the Selfconsistent Theory of Josephson Effect in Ballistic   Superconducting Microconstrictions