title: How to Iterate Through Values in Properties File in Java
body: <p>so I was wondering if anyone knew how I would go about reading in mutliple values from a key, delimiting them by commas and storing them to an arraylist from a properties file in java?</p>
  
  <hr>
  
  <p><strong>I have a properties file with just this in it:</strong></p>
  
  <blockquote>
    <p>currentProposalsLocation = C:/Documents and Settings/Intern
    Project/Extracted Items<br>
    keywordsList = "A,B,C,D,E,F"</p>
  </blockquote>
  
  <hr>
  
  <p><strong>And this is my code to load the properties file:</strong></p>
  
  <pre><code>    static String proposalsDirectory;
      static ArrayList&lt;String&gt; keywordsList = new ArrayList&lt;String&gt;();
      private static final String PROP_FILE="C:/Documents and Settings/Intern Project/ipConfig.properties";
  
  public static void readPropertiesFile()
  {
       try
      {
           InputStream is = XMLTagParser.class.getResourceAsStream(PROP_FILE);
           Properties prop = new Properties();
           prop.load(is);
           proposalsDirectory = prop.getProperty("currentProposalsLocation");
           //?????What to do here????
           is.close();
      }
      catch(Exception e)
      {
           System.out.println("Failed to read from " + PROP_FILE + " file.");
      }
  }
  </code></pre>
  
  <p>If anyone could help me out, I'd really appreciate it.</p>