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.
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.
Execute setupenv.cmd or setupenv.sh 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 setupenv.sh is similar to that of setupenv.cmd. If there is any problem with execution, please refer to the code of setupenv.sh.
sudo rm -f /usr/bin/dml.sh sudo ln -s /data/xworker/dmlforlink.sh /usr/bin/dml.sh sudo rm -f /usr/bin/dml-rap.sh sudo ln -s /data/xworker/dml-rapforlink.sh /usr/bin/dml-rap.sh 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
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!"/> </ActionThing>
Execute helloworld.dml under the console, if it prints out Hello World! , indicating that the global engine setting is successful.
Copyright © 2007-2019 XWorker.org 版权所有 沪ICP备08000575号