In many cases, it is necessary to master the import and export of Java projects by passing the current Java project to someone else to continue working or working together, or to receive the delivered Java project from someone else.
Hello world-> Right->export...->general->archive (compressed file)->next
Tick Hello World
The two on the right is about the project. Classpath configuration file and current project configuration file (. Project)
If you want the project to be exported after it can be imported by someone else and continue to use development
. Classpath and. Project all two files are checked
Specifies the current file output path
Named Hello.zip, click Save
Don't bother with the hint that appears, continue
Options can be saved as a zip (save in ZIP format) or tar (save in tar format)
The ZIP format is more generic and widely used, and in general the use of ZIP format is selected
"Compress the contents of the file" This option means that the files in the project are compressed
If it is not compressed, then the files stored in the zip are stored in a direct way.
The "Create directory structure for Files" option represents the file structure of the entire project
All stored in a compressed file
This is no problem, click Finish
Open the File Management panel to find the folder that received the export, you can find Hello.zip
You can double-click to unzip it, and then the Hello World project appears, and the files in it are lossless
If you go back to eclipse and delete the current project
and tick Delete the local project file (delete project contents on disk), click Finish
You can see that the current project has been deleted in the workspace
If you receive a project file sent by someone else, you need to import it into eclipse.
in the project management panel on the left, right-click->import->general->existing Projects into Workspace
Import the existing project files into the workspace
Tick copy projects into workspace (copy the current project to the workspace)
Click Finish
Import and export of items in Java