  Optical generation of millimeter-waves (mm-wave) is made possible by an
optical heterodyne of two diode lasers on a uni-traveling-carrier photodiode
(UTC-PD). We utilized this technique to produce a mm-wave oscillator with
desirable phase-noise characteristics, which were inherited from a pair of
narrow-linewidth diode lasers. We present the long-term stabilization of our
oscillator, achieved by referencing it to a rotational transition of gaseous
nitrous oxide (N2O). Direct frequency modulation spectroscopy at 301.442 GHz
(J=11) generated an error signal that disciplined the frequency difference
between the diode lasers and thus, locked the millimeter-wave radiation to the
molecular rotational line. The mm-wave frequency was down-converted using an
electro-optic (EO) comb, and recorded by a frequency counter referenced to a
Rubidium (Rb) clock. This resulted in short-term fractional frequency stability
of $1.5 \times 10^{-11}/\sqrt{\tau}$ and a long term-stability of $4\times
10^{-12}$ at 10,000 s averaging time.
