-1

I want to access a folder that contains already written java files and img files in Eclipse. I did it already with one folder but I don't remember how. I want to get everything in one place like in this picture

enter image description here

Error

enter image description here

Joseph hooper
  • 967
  • 4
  • 16
  • 35

2 Answers2

0
  1. File > New > Java Project

File -> New -> Java Project

  1. Type a name into the "Project Name" box

  2. Uncheck "Use Default Location" and put in a path to your folder

enter image description here
4. Click Finish

  1. You may also need to set your source folder to be a source folder. Right Click > Build Path > Use as Source Folder

  2. If you end up with access restriction errors on system libraries, follow the instructions given here -- delete the JRE library from your build path and add it back.

enter image description here

Community
  • 1
  • 1
k_g
  • 4,333
  • 2
  • 25
  • 40
  • Does it matter that the java files are in the default package and the image files are out side of any folder? Also all of my files have access restriction errors on them. – Joseph hooper Apr 19 '15 at 05:47
  • default package: I don't think that matters; image files outside of any folder: I don't think that matters as long as they are in your project folder. Access Restriction Errors: this isn't really eclipse's problem, there's something wrong with your code or build path. – k_g Apr 19 '15 at 05:51
  • but it works fine when i compile and run it using the command prompt – Joseph hooper Apr 19 '15 at 05:53
  • that's actually a problem that is not unique to these kinds of imports. A solution can be found [here](http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar) -- I have also added this to my answer – k_g Apr 19 '15 at 06:11
  • @Josephhooper you should upvote the answer that you've already accepted, since k_g lost his time helping you, and since it's free. – Andrea Ligios Apr 22 '15 at 13:20
0

I ended up creating a new project and creating a new folder, and then linked it to the existing folder i wanted to add

Joseph hooper
  • 967
  • 4
  • 16
  • 35