Importing an Eclipse Project from an Eclipse Workspace

This section walks through the procedure of importing an Eclipse project from an Eclipse Workspace. When using the option to import Eclipse projects, NetBean will automatically determine any project dependencies and import those as well.

To initiate an import of an Eclipse project, ignoring any project dependencies that may exist, select the File > Import Project > Eclipse Project menu in the NetBeans IDE. This will display Import Eclipse Project wizard. From the Import Eclipse Project wizard, specify the location of the Eclipse Workspace. An example is shown below.

Selecting the Eclipse Projects to Import

Once you have specified the location of the Eclipse Workspace, press Next to display the Project to Import portion of the Import Eclipse Project wizard. This portion of the wizard asks you which Eclipse projects you would like to import and the location for the the imported project.

If there are project dependencies between a selected Eclipse project to import, NetBeans will automatically determine this and mark those dependent projects for import also. In the example below, the MainProject was initially selected, but since MainProject depends on the HelperProject it is automatically marked for importing too. Notice the checkbox next to HelperProject is also marked along with the checkbox for MainProject.

To complete the Import Eclipse Project wizard press the Finish button.

If NetBeans discovers discrepancies in the Eclipse project while processing the Eclipse project information and believes it can resolve those discrepancies automatically, NetBeans will display a Warning dialog showing the Eclipse project discrepancies it has found and the corrective action NetBeans will take. If you see this dialog, there is no additional work required by you. The dialog is meant to be an informative dialog to let you know the NetBeans Eclipse Project Importer has found discreprancies in the Eclipse project NetBeans is importing. For more information see Handling Eclipse Project Discrepancies.

If the NetBeans Eclipse Project Importer discovers problems in an Eclipse project such as a project resource that could not be found, NetBeans will display a Reference Problems warning dialog along with appropriate actions for you to take in order to resolve these Eclipse project references. This dialog is presented to the user so that he or she may correct problems that have been detected in the Eclipse project while the NetBeans Eclipse Project Importer is processing the Eclipse project information.

If there were no Eclipse project reference problems discovered by NetBeans during the Eclipse project import which require a resolution, you may begin using the NetBeans IDE. For instance, you can immediately use the NetBeans IDE Project Viewer to traverse the imported project(s) or you can begin running your newly imported Eclipse project(s).

Viewing the Imported Projects

Once NetBeans has completed the Eclipse project import, you view the imported projects in NetBeans by opening the Projects window. Below is an example screen shot of the NetBeans Projects window showing imported Eclipse projects called MainProject and HelperProject. Notice that NetBeans has preserved the project dependencies.

Running the Imported Projects

Once you have imported your Eclipse projects you can run them in NetBeans by opening the NetBeans Projects window, right clicking on the project to run and selecting Run as shown below.

That's it! As you can see, migrating Eclipse projects to NetBeans is very easy with the NetBeans Eclipse Project Importer.

Bookmark this page furl slashdot technorati digg
get support for the NetBeans


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2016, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo