0

I'm writing a program with Warework Connected Distribution for PC-MAC that consists of three JARs: one with the Java code of my application, another with the resources of the application and the last one is the Warework JAR.

The JAR with the Java code contains a default configuration while the resources JAR contains the main configuration of the application (used in most cases).

As many resources in both JARs have the same name, how do I tell Warework to load the configuration files from a specific JAR?

Unihedron
  • 10,902
  • 13
  • 62
  • 72
Chafi
  • 33
  • 3

1 Answers1

0

You can create a dummy class (an empty class, without nothing) in your resources JAR and configure Warework to use this class to load the configuration of your application from the resources JAR. Just provide the dummy class when you create the Scope, for example:

ScopeFacade system = ScopeFactory.createFacade(Dummy.class, "config", "app-name");

or:

ScopeFacade system = ScopeFactory.createTemplate(Dummy.class, "full", "app-name");

And that's it. Now you should be able to read resources from your resources JAR.

Warework
  • 31
  • 1