...snip..
I believe what is being asked for is a way to "format" the text and force line endings (\n. \r, etc. depending on document ) at the current line-breaking column (eg 72). Of course the breaks would occur at word boundaries.
...snip...
The "format". I have this operation in a favorite windows editor - it's handy. I admit to liking a few simple windows editors...
But Geany... I compiled and ran Java each with one button click in Ubuntu. Geany knew how with no tool set up. The output window was useful. Again, I'm liking this.