 <p>Try this <code>Right Click on File -&gt; Open With -&gt; Java Editor</code></p> <p><img src="https://i.stack.imgur.com/Lp1gT.png" alt="enter image description here"></p> <p>Make sure you are in the <code>Java perspective.</code></p> <p><img src="https://i.stack.imgur.com/GYVe9.png" alt="enter image description here"></p> <p>Try cleaning eclipse. Start eclipse with</p> <pre><code>eclipse --clean </code></pre> <p>Hope this helps.</p>