Grid Library Example
The following example grid-library.xml is for a mixed Java/C++ application that runs on Windows, and both gcc and gcc34 for Linux:
<?xml version="1.0" encoding="UTF-8"?>
<grid-library>
<grid-library-name>MyLib</grid-library-name>
<grid-library-version>1.0.0.1</grid-library-version>
<!-- Example of how to use both gcc and gcc34 libraries -->
<lib-path os="linux" compiler="gcc">
<pathelement>lib/gcc</pathelement>
</lib-path>
<lib-path os="linux" compiler="gcc34">
<pathelement>lib/gcc34</pathelement>
</lib-path>
<!-- All three C++ bridges are included here -->
<dependency>
<grid-library-name>cppbridge-vc14</grid-library-name>
</dependency>
<dependency>
<grid-library-name>cppbridge-gcc</grid-library-name>
</dependency>
<dependency>
<grid-library-name>cppbridge-gcc34</grid-library-name>
</dependency>
<!-- Specifies that win32 use this JRE Grid Library, others use default -->
<dependency>
<grid-library-name>jre-win32</grid-library-name>
<grid-library-version>1.8.0.161</grid-library-version>
</dependency>
<!-- Specifies JVM options in a JRE Grid Library -->
<arguments>
<property>
<name>-Xdebug</name>
</property>
<property>
<name>-Xmx512m</name>
</property>
<property>
<name>-Dfoo</name>
<value>bar</value>
</property>
</arguments>
<!-- Example of linking to another of my Grid Libraries-->
<dependency>
<grid-library-name>MyCalculator</grid-library-name>
</dependency>
<hooks-path>
<pathelement>hooks</pathelement>
</hooks-path>
<!-- Example of multiple jar paths -->
<jar-path>
<pathelement>jars</pathelement>
<pathelement>morejars</pathelement>
</jar-path>
<!-- Example of a lib path with absolute dir -->
<lib-path os="win32">
<pathelement>lib\win</pathelement>
</lib-path>
<!-- Example of OS-dependent env vars, using a property sub -->
<environment-variables os="win32">
<property >
<name>MY_WIN_VAR</name>
<value>$WinVar$</value>
</property>
</environment-variables>
<environment-variables os="linux" compiler="gcc">
<property >
<name>MY_GCC_VAR</name>
<value>$LinuxDriverDir$</value>
</property>
</environment-variables>
<java-system-properties>
<property>
<name>foo</name>
<value>bar</value>
</property>
</java-system-properties>
</grid-library>