Line breaks in Eclipse and Windows
Line feed identifier of different systems
Windows
|
Use \ r \ n |
| Linux/Unix |
Use \ n |
| Mac OS |
Use \ r |
FileUtils. writeStringToFile (file, "The first line is \ n. The second line is \ r. The third line is \ n \ r. The fourth line is \ r \ n. \ r \ n the fifth line "); write this part of content to the files in the notepad and Eclipse project directories in windows respectively.
Here is my test data: the first line is \ n the second line is \ r the third line is \ n \ r the fourth line is \ r \ n \ r \ n fifth line
File write results in Eclipse:
The first line is \ n
The second line is \ r.
The third line is \ n \ r.
The fourth line is \ r \ n.
Fifth line
Windows notepad Write result:
The first line is \ n. The second line is \ r. The third line is \ n \ r. The fourth line is \ r \ n.
Fifth line
We can see that \ r \ n is a line feed operation in windows, while \ n, \ r, \ r \ n in Eclipse can achieve line feed, in addition, \ n \ r can be changed to two lines in Eclipse. To ensure that line breaks can be implemented in Eclipse and windows, \ r \ n is recommended (because I use windows ).
From this we can see that Eclipse actually provides support for line breaks in different systems, so any line breaks can be completed in Eclipse, but in the specific system, select.
Hadoop Eclipse plug-in compilation and installation 1.2.0
Compile Hadoop plug-in Eclipse
Hadoop 1.2.1 compile Eclipse plug-in
Install JDK and Eclipse for C/C ++ in Ubuntu 13.10 (solving global menu problems)
How to install the latest Eclipse version in Ubuntu 14.04
This article permanently updates the link address: