Answers for "how to classloader get resource in java to load file in other directory"

4

java resource file

File file = new File(
	getClass().getClassLoader().getResource("database.properties").getFile()
);
Posted by: Guest on May-28-2020
3

java resource file

InputStream inputStream = getClass()
		.getClassLoader().getResourceAsStream("database.properties");
Posted by: Guest on May-28-2020

Code answers related to "how to classloader get resource in java to load file in other directory"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language