We use the color-octet mechanism combined with the two gluon exchange model for diffractive J/ production in resolved photon processes. In the leading logarithmic approximation in QCD, the diffractive J/ production cross section is related to the square of the off-diagonal gluon density of the proton, the gluon density of the photon and to the nonperturbative color-octet matrix element of ͗0͉O 8 J/ ͓ 3 S 1 ͔͉0͘. The cross section is found to be very sensitive to the gluon density of the photon. As a result, this process may provide a wide window for testing the two-gluon exchange model, studying the nature of hard diffractive factorization breaking and may be particularly useful in studying the gluon distribution of the photon. It may also give some insight into the color-octet mechanism proposed by solving the Ј(J/) surplus problem at the Fermilab Tevatron.