You can get the resources in your classpath (even when sealed in the JAR) by using the ClassLoader#getResource()
and ClassLoader#getResourceAsStream()
methods.
For example:
Properties values = new Properties();
values.load(ThisClass.class.getClassLoader().getResourceAsStream("myproject.properties"));
// umm, don't forget to close the stream, this code is just an example usage
Note that storing the username and password to any database in a program is considered a heavy security riskis considered a heavy security risk.