Question: I have switched over to Netbeans and am finding accessing files in packages quite perplexing. Usually I would just have everything in the one folder.

I have created packages in my project which is structured like so:

```
project_name  
......Source Packages  
............Game  
............Players  
............Resources  
..................Levels  
..................Images  

```

I want to access a text file that resides in the Resources.Levels package from my Gui class which resides in my Game package. How would I do this? Ideally I want to create a String = "mapFile.txt"

Thanks

Answer: 
```
MyClass.class.getResources("/Resources/Image/myImage.jpg");

```
This has nothing to do with NetBeans, but everything to do with Java. To access a resource in the classpath, you should use [`Class.getResourceAsStream()`](http://download.oracle.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream%28java.lang.String%29) method. Read its documentatino carefully. In your case, you should use

```
Gui.class.getResourceAsStream("/Resources/Levels/mapFile.txt");

```

Also, packages in Java should be in all lowercase.