How to display line numbers in Eclipse

By default, Eclipse doesn’t display the line numbers in the text editor. This simple tutorial provides a step by step guide on how to activate this option.

1. Step #1

Go to windows -> preferences

Eclipse windows preferences

2. Step #2

Type “text editor” inside the search box at the top left of the popup, then click on “Text Editors” node under “Editors” as the following:

Eclipse preferences text editor

Finally, tick the “Show line numbers” checkbox then click OK, and you’re good to go.


0 0 votes
Article Rating

Hussein Terek

Owner of, I have a passion for software engineering and everything related to Java environment.

Inline Feedbacks
View all comments