Add a java source code file/folder that does not belong to the project in eclipse, eclipsejava
Sometimes it is to view the source code of a software, but this code is not open source. Some java source code may be provided as a reference for some convenience of development, but other parts are encapsulated and cannot be viewed completely. In this way, if a file is viewed as a file, it cannot be compiled, and the related library functions cannot jump to the search for calls between classes.
So the first thing that comes to mind is creating a project and copying the file code one by one. However, if it is a large project with many files, it will be especially troublesome.
By accident, I found that the source code folder is directly dragged into the source folder of the new project, and the folder can be automatically added, saving the process of creating a file and a file, very convenient.
The specific steps are as follows:
1. Create a project
2. Expand the project and see src source folder
3. Drag the source code folder directly into the src
This is done.