You need to tell java where your folder(resources) is. In Eclipse, most likely very similar to Netbeans as well, you can simply open the project properties and add the folders you need to the build path. This is much easier than doing it manually.
The reason it works when it’s not inside the folder, I’m guessing, is because Netbeans has added that folder to the build path by default (Eclipse does this with the “src” folder). However, since you’ve created a new folder/package, you need to add it to the build path yourself.
Additionally however, if you’ve created your folder within the default “src” folder that Netbeans added to the build path by default - then you only need to specify the correct location of the file. In other words, the path should be something like this:
.getResource("folder/love.jpg");