jGuru: Fundamentals of the JavaMail API. Sending email in Java. How to load a properties file in Java. This tutorial will explain how to access properties file through Java coding.
A properties file can be accessed with the ResourceBundle class which resides in the java.util package. In the example below I’m going to provide is based on the properties file staying in the same package.