In Eclispe you can set the line delimiter used to Windows, MacOS or Unix.
(e.g. Window > Preferences > General > Workspace > 'New text file line delimiter' > Other > Unix)
In Eclispe you can also convert an existing files to delimiter
To convert existing files, open file for editing and for the currently edited file, go to the menu:
(File -> Convert Line Delimiters To > Unix)
NetBeans is not a powerful.
For existing files NetBeans uses line separator of the first line.
For new files (constructed from templates) the editor uses platform-default line separator.
This is already requested, thank you.
*** This issue has been marked as a duplicate of 72515 ***