Moving a Java project between Eclipse installations

Tuesday, April 14th, 2009

The quickest way I have found of moving a Java project from one Eclipse installation to another.

(I am using Eclipse 3.4.1)


1. Copy the directory from your source Workspace to your target Workspace.

2. Remove the .classpath and .project files from the target. (These will be regenerated by Eclipse).

3. In your target installation of Eclipse go to File->New->Java Project

4. Enter a project name and click the ‘Create project from existing source’. radio button

5. Browse to your target directory in Workspace, click ‘Finish’

6. In your target Eclipse go to Project->Properties , select Java Build Path

7. Assuming you have copied over all jars that you are using, refer to your source installation of Eclipse Project->Properties->Java Build Path, Libraries tab and add all your jars.

8. (Target Eclipse) Project->Build Project and it should build.



Optional – Defining the output directory of your class files.

9. (Target Eclipse) Project->Properties->Java Build Path, Source, Browse button

10. Click ‘Create New Folder’, specify Folder name (this can be anything), click ‘Advanced’

11. Tick ‘Link to folder in the file system’, browse to output folder (usually WEB-INF/classes)

12. Click, ok, ok, ok.

The next time you build – your classes should be compiled into your chosen output directory.

If you know of a quicker/better way – let me know!

Mark B

Tuesday, April 14th, 2009 configuration, development, java, tools