LearnerBeware
LearnerBeware

Reputation: 73

Adding .java files into eclipse?

I am so new to this, this is probably a stupid question but...

Basically my lecturer has given us a bunch a of .java demos. They are all inside a single file called 'demos'. I was wondering how would I import the 'demos' folder into Eclipse so I can use the folder expand it and select and drag any program I want to run into the work space.

Upvotes: 2

Views: 108

Answers (2)

user2638922
user2638922

Reputation:

Right click in project, Import... > General > Existing Projects into Workspace, chose your project.

Or:

Create a new project, drag and drop example.java files.

Upvotes: 4

Jason C
Jason C

Reputation: 40315

Extract your demos folder somewhere. Right click on the project browser, then:

  1. New -> Java Project
  2. Enter a project name then press Next
  3. Click "Link additional source folder" in the bottom half of this page
  4. Select your source folder
  5. Finish

Now your folder will appear in your project, and you can edit files as usual. Keep in mind that editing / adding / removing files there will modify the actual files in that source folder.

Upvotes: 0

Related Questions