How to Use Apache Commons Configuration

1) Create the file:

message=Hello World!

2) Create the file:

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;

import static java.lang.System.out;

public final class CommonsSample {

  public static void main(final String[] args) throws Exception {
    final Configuration config = new PropertiesConfiguration("");



3) Compile the file.

4) Launch the CommonsSample class.


2 thoughts on “How to Use Apache Commons Configuration

  1. At compile time I received the message:

    cannot access
    not found.

    I´ve commons-configuration-1.2.jar in my class path
    but inside this file there no one filed called

    How could I solve this error ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s