To set the maximum line length in Eclipse, open Eclipse and in the menu bar, go to Window -> Preferences and in the pop-up window, go to Java -> Code Style -> Formatter.

How to set maximum line length in eclipse

This will open up the Formatter options in the right window pane. Click on the Edit button to modify the current formatter profile.

How to set maximum line length in eclipse

In the formatter profile pop-up window, click on the Line Wrapping tab. The width of the line can be set in field, Maximum line width.

How to set maximum line length in eclipse

Changing any of the [built-in] profiles requires to save the changes as a custom profile. More details about how to do this can be found in my blog, How to create and share Eclipse code style formatter

How to set maximum line length in eclipse
    

Comments, Questions or Suggestions: