In my IDE I'm able to get the path of an image that is in my resource folder and make that path a new file object by doing this:

```
URL imagePath = getClass().getResource("/image.png");
try
{
    //Convert the URLs into URIs and make a file object with that path
    File image = new File(imagePath.toURI());

}
catch (URISyntaxException e)
{
    e.printStackTrace();
}

```

But when I make a jar file of my program I get the error URI is not hierarchical. And I have done some research and found out that I have to create an InputStream using the getResourceAsStream() method. But I do not know how to make that work for an image. I just need to be able to get the path of the image from my resource folder. How would I make this work even if its a jar.