# Changing the Load Order

## Changing the Loader Order <a href="#h.p_ldwcvoyaib6_" id="h.p_ldwcvoyaib6_"></a>

It's easy to edit or change the order of the loaders:

```java
import org.yarnandtail.andhow.*;
import org.yarnandtail.andhow.load.std.*;

public class ModifyStdLoaderOrder implements AndHowInit {
    @Override
    public AndHowConfiguration getConfiguration() {
        return AndHow.findConfig()
            .setStandardLoaders(StdEnvVarLoader.class, StdJndiLoader.class);
    }
}
```

The example class above implements the AndHowInit interface. At startup, AndHow will discover this class and use it to configure itself. In this case, the standard list of seven loaders has been replaced with just two.

## Adding custom loaders

&#x20;Its also possible to leave the standard list intact and insert loaders between the standard loaders:

```java
@Override
public AndHowConfiguration getConfiguration() {
    PropFileOnClasspathLoader pfl = new PropFileOnClasspathLoader();
    pfl.setFilePath("/my.properties");
    return AndHow.findConfig()
        .insertLoaderBefore(StdJndiLoader.class, pfl);
}
```

Only a single instance of each of the Standard loaders is allowed - these are the loaders with names start with 'Std' and implement the StandardLoader interface, however, it is OK to insert any number of any other loader.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.andhowconfig.org/user-guide/changing-the-load-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
