Load application package image using File

Asked

Viewed 22 times

0

Good morning,

How do I load an image that is inside a project package using the Java File class?

Example, I have an image inside the "img" folder of my project and I want to upload this image to create a File Object:

File file = new File("img/logo.png");

But he can’t find the file at all.

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.