propsdatabase = new Properties();
InputStream dbin = getClass().getResourceAsStream("/properties/database.properties");
propsdatabase.load(dbin);
I am reading database connection data through a properties file called "database.properties" in a folder named "properties". Jus below the root directory.
The code worked fine when the container was exported to Eclipse.
But I used the Maven project in IntelliJ to get the jar. It throws a NUll pointer exception.
Since the value of dbin is NULL. (I printed and checked as well).
I conclude that the path is not recognized for reading the file.
Now all is well with IntelliJ.
When exporting as a jar to Eclipse Bank, although it contains a folder with its own names, IT was not detected. help with
source
share