I tried to read the .properties file and have the following code:
public final class Config { static { Properties properties = new Properties(); InputStream propertiesStream = Object.class.getResourceAsStream("config.properties"); if (propertiesStream != null) { try { properties.load(propertiesStream); } catch (IOException e) { e.printStackTrace(); } } else { System.out.println("file not found"); } } }
but he continues to say that the file was not found.
Property Content
pwd=passw0rd
Does anyone know how to solve this problem?
source share