I have a config.properties file that my JavaMail program pulls from for the email address's, message, etc. When I update the config.properties file, the jar file doesn't pull from that config file, but instead pulls from the config file when I initially created the jar file. I am using Eclipse. I was wondering if there's a way to make the jar file pull from the updated config file or if I had to remake the jar every time. Thanks.
Asked
Active
Viewed 139 times
-1
-
If you read a resource in a jar through a classloader the classloader will usually cache the resource. – Thorbjørn Ravn Andersen Jul 24 '14 at 16:47
1 Answers
0
the answer is yes you have to rebuild everytime if you want to pull from the classpath
( inside a .jar
).
don't put the file in the .jar
is always an option
-
-
1put the properties file on filesystem and add its directory to your classpath while running it – Pat Jul 24 '14 at 17:15