How to Import Java Projects Into Eclipse for Beginners

by pgrzyby in Circuits > Software

17740 Views, 0 Favorites, 0 Comments

How to Import Java Projects Into Eclipse for Beginners

eclipsefinalver2_766.jpg

Introduction

The following instructions provide step by step guidance for installing Java projects onto the computer software Eclipse. Java projects contain all code, interfaces, and files necessary for creating a Java program. These projects are placed in a unique workspace directory. When installing these files from a separate source, they must be placed correctly within the files of the computer to be properly located by Eclipse. This simple instruction set aims to assist beginners in this task.

Disclaimer!

The instruction set uses the Java project algs4 as an example. This particular Java project is adapted from the textbook Algorithms by Robert Sedgewick. This contains the example and assignment files that go along with the textbook’s material. In addition, the examples below use a PC, though the process is nearly identical on a Mac.

Obtain the Java Files You Wish to Install

thumb_14366590180Icon.jpg

Obtain the Java files you wish to install to Eclipse by downloading them from their source. The files will be in a zip file.

Create a New Folder

2 (2).png

Create a new folder on your device for the Java files by right clicking and navigating to :

New > Folder

The workspace directory folder and its Java project subfolders will be placed in this location

Extract All Contents of Zip Folder

3.1 (2).png
3.2.png

Extract the contents of the downloaded zip file into the folder created in Step #2. Right click and press “Extract All...,” choose the correct location path, and then press “Extract”.

Initialize Eclipse

how files should look like.PNG
4.3 (2).png

Once the files are properly downloaded and placed into an accessible folder, initialize Eclipse.

Disclaimer: Eclipse is a complex software that often takes a few minutes to initialize.

Select Workspace Directory

5.1 (2).png
5.2 (2).png

Eclipse will prompt the user to select a workspace directory. Select the folder representing the correct workspace directory by selecting “Browse” and searching for it. In the example, the folder is titled workspace.

Launch Eclipse

Once a workspace directory is selected, press “Launch” and Eclipse will proceed to load in this location.

Create a New Project in the Workspace Directory

7.png

Create a new project in the workspace directory by navigating to :

File > New > Java Project

Identify and Type in Java Project Name

8.png

Identify the Java project subfolder you wish to import. In this case, the project is titled algs4. Type the name of this folder in under “Project Name”.

Adjust Execution Environment

9.png

Make sure the execution environment is appropriate for the files you are importing. In this case, JavaSE-1.8 is the JRE (Java Runtime Environment) required.

Finish

wwww.PNG

If the note in Figure 10 is shown, press “Finish” to create project. If not, restart the process, double checking each step.

Conclusion

Congratulations! The Java files should now be properly installed and ready for use.

It is vital to maintain the organization of folders and subfolders as is in order to access this code each time Eclipse is launched.

This set has provided step by step guidance for installing Java projects onto the computer software Eclipse. Enjoy programming!