There is a project with architecture: enter image description here

The resource folder contains the properties file and the DB folder.

In the DB folder there is a file properties.db.

I find the file properties simply:

 final Properties properties = new Properties(); properties.load(MyClass.class.getClassLoader().getResourceAsStream("properties")); 

But I can not find the properties.db file.

What do I need to register to find properties.db ?

    1 answer 1

    How does that work?

     properties.load(MyClass.class.getClassLoader().getResourceAsStream("DB/properties.db")); 
    • the fact of the matter is that there is no - Vlad Skoriy
    • works for me. Are you not case-sensitive or file name? - Anton Shchyrov
    • Open the resources folder and re - upload the screenshot - Anton Shchyrov
    • No, I did not confuse, if you click on the path to the file through "ctrl" (click on the control and click on the path to the file), then the file opens to me. Those. the idea understands which file I'm trying to reach. Maybe the problem is that I have a maven application on Spring-boot and it changes something in the directories in the resources? - Vlad Skoriy
    • And so? properties.load (MyClass.class.getClassLoader (). getResourceAsStream ("/ DB / properties.db")); - ezhov_da