The feasibility of heating TJ-II plasmas by electron Bernstein waves (EBWs) is studied. As a first approach, the Clemmov-Mullaly-Allis diagram is studied to explore the possible heating regimes, and the TRUBA ray- and beam-tracing code, which has been adapted to the complicated TJ-II geometry, is used to perform detailed calculations. The final result is that it is possible to heat plasmas by overcoming the cutoff density of electromagnetic modes by injecting the O mode and X mode at the first harmonic, exploiting the O-X-B1 and the X-B1 schemes. Transport simulations are performed to estimate the plasma parameters that are expected in those regimes and to study the transition from the X mode at the second harmonic to EBW heating at the first harmonic.