Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Libraries paths declarations



Some modules may need to access native libraries. By default you can declare this by using the -Djava.library.path command-line property when starting the framework and pointing to your libraries folders. For example:
      java -jar protoFramework.jar -Djava.library.path=my/lib
However there is another way to do this in the Framework configuration.

Using an alternate way to describe the library path

You can use the libPath element in the Framework configuration file. For example:
      <files>
         <file url="applications.xml" />
         <file url="services.xml" />
         <file url="types.xml" />
         <file url="properties.xml" />
         <libPath url="my/lib" />
      </files>
Note that the order of the libPath element is not significant.

Of course the path can be relative to the configuration file, or absolute. The native libraries must be in the directory specified by the path.

Having more than one native libraries path

You can use more than one libPath element, for example:
      <files>
         <libPath url="my/lib" />
         <file url="applications.xml" />
         <file url="services.xml" />
         <file url="types.xml" />
         <file url="properties.xml" />         
         <libPath url="my/lib2" />
      </files>

Limitation

This approach is only possible prior to Java 10. Beginning with Java 10, oyu will need to sue the default way to specify the -Djava.library.path property, which is by specifying it on the command-line.

See also


Categories: config

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence