Skip to content

Quick documentation on using CONF file external to a JAR #84

@igozali

Description

@igozali

Hi guys,

I've been scratching my head and trying to find documentation on how to do this.

Basically, I have a standalone, executable JAR which contains a reference.conf in its src/main/resource folder.

I want to be able to pass in an application.conf that is external to this JAR and overrides the resource.conf.

Here's some examples of how I think I should be doing it:

$ ls
standalone.jar    application.conf

$ java -cp standalone.jar com.standalone.Main
Option 1. Running com.standalone.Main with reference.conf included inside the JAR.

$ java -cp standalone.jar:application.conf com.standalone.Main
Option 2. Running com.standalone.Main with application.conf inside the classpath

$ java -cp standalone.jar com.standalone.Main application.conf
Option 3. Running com.standalone.Main with application.conf passed in through command-line arguments

It would be great if you can help me with this, or provide documentation on how to do this, since this seems like something a lot of people might want to do?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions