We solved a Sommerfeld-type boundary value problem of an infinitely long antenna lying over multilayered media. Rigorous integral representation was obtained for the current on the antenna when excited by a delta function voltage. Comprehensive analyses of the singularities of the integral representation were performed for the most general case of antenna lying over multilayered media. The analyses indicate that the total current on this open waveguide structure consists of, generally, infinite number of discrete modes (contributions from poles) and continuous modes (contributions from the integrals along the branch cuts). Detailed expressions were given for the discrete and continuous spectral representations of the total current. Numerical results were obtained for the input impedance spectra of an infinite antenna lying over various layered media. Experiments were also conducted with a long antenna connected to a time-domain reflectometer and placed horizontally over tap water. Both the numerical and experimental results suggest that a single long antenna could be used as a sensing tool to detect the profile of a layered medium.