Global Engine

1. Effect

    The so-called global engine refers to registering the environment of a dynamic model as a system level, so that the model file can be directly directly in any directory.

     As shown in the figure above, after setting the global engine, the helloworld.dml model can be directly executed.

2. Set the global engine

2.1. Install XWorker

    See How to install XWorker. The recommended version to install is explorer, which includes More model libraries. You can also modify pom.xml later to manage the required model library yourself.

2.2. Execute setupenv

    Execute setupenv.cmd or as an administrator.

    The function of setupenv.cmd is to associate *.dml and *.dmw files with dml.cmd and dmw.cmd in the current directory. The difference between dml and dmw is that one uses java and the other uses javaw to execute, where javaw has no console.

    The function of is similar to that of setupenv.cmd. If there is any problem with execution, please refer to the code of

sudo rm -f /usr/bin/
sudo ln -s /data/xworker/ /usr/bin/
sudo rm -f /usr/bin/
sudo ln -s /data/xworker/ /usr/bin/
sudo xdg-mime install --mode system ./config/xworker-dml.xml
sudo cp ./config/xworker.desktop /usr/share/applications/
xdg-mime default xworker.desktop text/dml

3. Test the global engine

     Save the code below as helloworld.dml.

<?xml version='1.0' encoding='utf-8'?>

<ActionThing name="HelloWorld" descriptors="xworker.lang.ActionThing">
    <Println name="helloworld" message="Hello world!"/>

    Execute helloworld.dml under the console, if it prints out Hello World! , indicating that the global engine setting is successful.

Copyright ©  2007-2019  版权所有  沪ICP备08000575号