Setting environment variables on Linux

  1. Type in the Linux Console.
  2. Set the PATH environment variable to include the directory where you installed the Ant bin directory.
    export PATH=${ANT_HOME}/bin:${JAVA_HOME}/bin:${PATH}
  3. Set the ANT_HOME environment variable to the directory where you installed Ant.
    export ANT_HOME=${ant_dir}
  4. Set the ANT_OPTS environment variable to the directory where you installed Ant
    export ANT_OPTS="-Xmx256M"
  5. Set the JAVA_HOME environment variable to the directory where you installed the J2SE JDK application
    export JAVA_HOME=${java_dir}
  6. Set the JHHOME environment variable to the directory where you installed the JavaHelp application
    export JHHOME=${javahelp_dir}
  7. Set the CLASSPATH environment variable for DITA-OT. Set up your environment variable CLASSPATH to include the lib directory, dost.jar, and resolver.jar.
    export CLASSPATH=$DITA_HOME/lib:$DITA_HOME/lib/dost.jar:$DITA_HOME/lib/resolver.jar 
  8. Set the CLASSPATH environment variable for the Apache FOP application. Set up your environment variable CLASSPATH to include the fop.jar, batik.jar and avalon.jar files in the FOP directory.
    export CLASSPATH=${fop_dir}/build/fop.jar:${fop_dir}/lib/batik.jar:${fop_dir}/lib/avalon-framework-cvs-20020806.jar:$CLASSPATH
  9. Set XSLT processor environment variables.
    • Set environment variables for Saxon:

      1. Set up CLASSPATH to include the saxon.jar file. For example:
        export CLASSPATH=${CLASSPATH}:${saxon_dir}/saxon9.jar:${saxon_dir}/saxon9-dom.jar 
      2. Set up ANT_OPTS. For example:
        export "ANT_OPTS=$ANT_OPTS -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl"
    • Set environment variables for Xalan: Set up CLASSPATH to include the xalan.jar file and the xercesImpl.jar file. For example:

      export CLASSPATH=$CLASSPATH:${xalan_dir}/bin