Importing and Exporting Resources in Eclipse


North Carolina State University
CSC 326 - Software Engineering
Laurie Williams, Dright Ho, Sarah Smith

Back to Software Engineering Tutorials


0.0 Outline
1.0 Eclipse Setup in the CSC326 Lab Environment
2.0 Exporting a Project from Eclipse
3.0 Importing a Project into Eclipse
4.0 Project Submission Guidelines

1.0 Eclipse Setup in the CSC326 Lab Environment

Each computer has a unique setup of Eclipse. Eclipse is installed in a folder titled eclipse/ under the C drive. Do NOT try and run Eclipse through Novell! The Eclipse directory contains a plugins/ folder when all the plug-ins to Eclipse are stored. All of the plug-ins that we are using for this class are installed in this directory. For more information about how to install plug-ins and the plug-ins used in this class see the Installing Plug-ins Tutorial.

When you first import a project into either Eclipse, it will attempt to compile the project. If there are any build path errors a red x will be displayed on the project. You can change the build path settings by right clicking on the project and selecting: Properties > Java Build Path > Libraries Tab.

Note: Make sure that you remove old build path settings before adding new ones for the application and/or system that you are using.

Top | Contents

2.0 Exporting Resources from Eclipse

2.1 There are two ways to export resources from Eclipse.

2.1.1 Select a project, then select File > Export...

2.1.2 Right click on the project, and select Export...

2.2 The Export dialog is now displayed. There are 7 ways to export resources in Eclipse.

  • Deployable features : Exports a plug-in project as a deployable feature.
  • Deployable plug-ins and fragments : Exports a plug-in project as a plug-in or fragment of a plug-in. You will most likely be using this one for your project.
  • File system : Exports the project as a file system. Note: If you are going to import the project into Eclipse later, make sure that you have the .project and build path files in the file system.
  • JAR file : Makes the project into a jar file
  • Javadoc : Exports the Javadoc generated for the project
  • Team Project Set : Exports shared projects.
  • Zip file : Makes the project into a zip file. Note: If you are going to unzip and open the project in Eclipse later, make sure that you have the .project and build path files in the file system.


Export a File System


Export a Zip File

Top | Contents

3.0 Importing Resources into Eclipse

2.1 There are two ways to import resources into Eclipse.

2.1.1 Select File > Import...

2.1.2 Right click in the Package Explorer view, and select Import...

2.2 The Import dialog is now displayed. There are 8 formats for importing resources into Eclipse.

  • Checkout Projects from CVS : Opens a project stored in CVS.
  • Existing Ant Buildfile : Creates a project from an existing Ant buildfile. It will not import the source code associated with the Ant buildfile.
  • Existing Project into Workspace : Imports an existing project into the workspace. Note: The project directory must contain a .project file. This is the best way to open a project in Eclipse that already exists in the file system.
  • External Features : Creates a project from features that already exist. It should only be used for feature based launching.
  • External Plug-ins and Fragments : Creates a project from an external plug-in or fragment.
  • File System : Imports resources from the local file system. You must have a project already created that you wish to import the resources into. Note: This is not a good way to import a project!
  • Team Project Set : Creates projects from previously exported Team Project Sets.
  • Zip file : Imports zip or jar files from the local file system into the specified project. It unzips the file contents into the selected project.

Note: It is easiest to import a project by, first, unzipping it in some directory, then importing an "Existing Project into the Workspace".


Import an Existing Project
Top | Contents

4.0 Project Submission Guidelines

Projects are to be submitted through the WolfWare submit locker of your lab section. Each project should be exported from Eclipse as a zip file, or the project folder can be zipped up from inside Windows. It would be helpful if the name of the file that you submit contained your name or unity ID, your partner's name or unityID, and the HW name (something like unityID1_unityID2_hw#.zip). Please make sure you put your name and your partner's name at the top of every file.

The TAs will unzip your project and import it into their Eclipse workspace. From there we will run your application and grade your documentation and/or models. For best results, it would be a good idea to have all external resources that you need for your project (like fit.jar and junit.jar) in a lib/ directory in your project. We will be willing to do minor build path changes to get your project to work with no penalty, but it is good form to have the project ready to deploy as soon as we import it into Eclipse.

For the final project, you will need to export your project as a "Deployable plug-ins and fragments". Note: Make sure to include your source code when you deploy your plug-in. The TAs will add your plug-in to our Eclipse plugins/ directory and test your plug-in in our version of Eclipse.

Top | Contents

Back to Software Engineering Tutorials

Importing and Exporting Resources in Eclipse ©2003-2006North Carolina State University, Laurie Williams, Dright Ho, Sarah Smith
Email Sarah Smith with any questions or comments about this tutorial.
Last Updated: Tuesday, January 31, 2006 10:51 AM