3.3. Setting system environment variables

When the BCVTB starts, it reads environment variables from the file bcvtb/bin/systemVariables-*.properties, where * is the name of the operating system. This file needs to be modified by the user to set the path to the different programs that are used by the BCVTB. The file can be edited with any text editor. It has the following syntax

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<-- This is a comment line -->

<properties>
  <entry key="name">value</entry>
  <entry key="name">value</entry>
</properties>

The properties section contains the environment variables. The attribute name is the name of any environment variable that either exists or that should be set by the BCVTB, and value is the new value of this environment variable. There can be any number of environment variables. For example, to set a new environment variable myProgramBin=C:\myProg (or myProgramBin=/usr/local/myProg on Mac or Linux) and add this variable to the existing %Path% (or $PATH) variable, proceed as follows:

  • in Windows, add the lines

    <entry key="myProgramBin">C:\myProg</entry>
    <entry key="Path">%myProgramBin%;%Path%</entry>
    to bcvtb/bin/systemVariables-windows.properties.
  • in Mac OS X, add the lines

    <entry key="myProgramBin">/usr/local/myProg</entry>
    <entry key="PATH">$myProgramBin:$PATH</entry>
    to bcvtb/bin/systemVariables-mac.properties.
  • in Linux, add the same lines as for Mac OS X to bcvtb/bin/systemVariables-linux.properties.

Next, restart the BCVTB. To see the new environment variables, type

java -jar BCVTB.jar -diagnostics

on a console.