The model can be packaged into Jar with Java classes, using the Java project's own packaging and publishing method.
Model libraries can be packaged as Jars, and methods can be packaged as Jars with Java classes, except that a .dml or dml. properties file is required in the root directory of Jar, and the name of the model library is written in the .dmlor dml. properties file, such as.
Do not repeat the name of the model library, and do not conflict with the name of other model libraries.
Dynamic model engine initialization needs to specify a directory, which is the path of the engine. Engine paths are the root directories of shared class libraries, model libraries, and temporary working directories.
//X-Meta engines are single-instance World world = World.getInstance(); //Initialize engine, parameter is engine path， //If null, get the location of the model library through XMETA_HOME or XWORKER_HOME environment variables world.init(null);
Under the engine path, /lib and /os /lib/lib_linux_x86 are directories of shared class libraries, whose /os/lib directories store operating system-related class libraries.
Model libraries can be packaged into jars and placed under shared class libraries or under /projects /<model project>/ of engines.
Models placed in projects directories can usually be modified, while models placed in jars can not be modified.
Under the engine path, /work/ is a temporary working directory, such as temporary files to compile in the model, and so on.
If world.init(null), that is, the parameter is null, the engine will read the system environment variables XMETA_HOME or XWORKER_HOME to find the path of the model library.
When the world.init(path) parameter is not null, an empty directory can also be specified for the path of a specific model library.