# How to access photos if importing Processing into eclipse?

**URL:** <https://discourse.processing.org/t/how-to-access-photos-if-importing-processing-into-eclipse/29995>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [May 9, 2021, 9:33pm UTC](https://discourse.processing.org/t/how-to-access-photos-if-importing-processing-into-eclipse/29995 "2021-05-09T21:33:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magic](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Magic](https://discourse.processing.org/u/Magic)\
**Post date:** [May 9, 2021, 9:33pm UTC](https://discourse.processing.org/t/how-to-access-photos-if-importing-processing-into-eclipse/29995/1 "2021-05-09T21:33:46Z")

</div>

Hello, I am currently working on a photomosaic project. It’s the same one that The Coding Train did a video on. I just tried to port it into eclipse, and am adding some extra functions. How does one make it to where eclipse can find the photos that I try to use in my program. Currently whenever I run the program in eclipse, I get a " file x.jpg is missing or inaccessible".

---

<div class="post-metadata">

**Author:** ![Magic](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Magic](https://discourse.processing.org/u/Magic)\
**Post date:** [May 9, 2021, 9:46pm UTC](https://discourse.processing.org/t/how-to-access-photos-if-importing-processing-into-eclipse/29995/2 "2021-05-09T21:46:26Z")

</div>

I tried making a few edits, and now the error message I have is this:  
java.lang.NullPointerException  
at RexProject.setup(RexProject.java:55)  
at processing.core.PApplet.handleDraw(PApplet.java:2432)  
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)  
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)

is there a way to know what this means?

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [May 10, 2021, 11:50pm UTC](https://discourse.processing.org/t/how-to-access-photos-if-importing-processing-into-eclipse/29995/3 "2021-05-10T23:50:22Z")

</div>

Hi @Magic ,

Welcome to the community! 😉

I think that when doing a project in Eclipse, the path of the files is relative to the root of your project so if you have them inside `my-project/data`, you should say `loadImage("data/image.jpg")`.

Let me know if it works

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [May 10, 2021, 11:59pm UTC](https://discourse.processing.org/t/how-to-access-photos-if-importing-processing-into-eclipse/29995/4 "2021-05-10T23:59:09Z")

</div>

@josephh

nice to see you
