Home >>

How to Display Line Numbers In Eclipse


How to Display Line Numbers In Eclipse

I love Eclipse as an IDE for Java, but man do I hate how hard it is to find the setting to turn the line numbers on. I’ll keep this post short and sweet, but I just had to Issue Blog this one because it gets me every time!

The Problem

For some strange reason, Eclipse by default does not show line numbers in the Java or Java EE perspectives. I had this turned on in Indigo but it was reverted when I upgraded to Juno. Regardless, this is the default behavior in Eclipse and it drives me crazy!

The Solution

With the Java or Java EE perspective selected, perform the following steps.

    1. Navigate to Window -> Preferences

    1. From the Preferences menu, click into General -> Editors -> Text Editors
    2. In the Text Editors dialog, check the Show Line Numbers check box

Every time I have to set set / reset the show line numbers setting these steps elude me. Now they are hear for my reference, but I hope they’ll help you out as well.

Published by John Zeren

John Zeren is a software engineering professional with a concentrated background in, and passion for, web application development. As a technical and a people leader in the tech space, he is a champion of agile methodologies, collaboration, and using iterative development to solve complex problems.

Leave a comment

Your email address will not be published. Required fields are marked *