Go to main content

Developing Data Services

Exit Print View

Updated: August 2018

How to Set Up Your Environment

  1. Download and install JAXP and the correct version of the Java compiler and virtual machine.

    You can find instructions at https://docs.oracle.com/javase/9/.

    Note - This example requires at least Java 1.3.1.
  2. From the directory in which your source file is located, type the following:
    % javac -classpath jaxp-root/dom.jar:jaxp-rootjaxp-api. \
    jar:jaxp-rootsax.jar:jaxp-rootxalan.jar:jaxp-root/xercesImpl \
    .jar:jaxp-root/xsltc.jar -sourcepath . source-filename.java

    where jaxp-root is the absolute or relative path to the directory in which the JAXP jar files are located and source-filename is the name of your Java source file.

    A classpath in your compilation command line ensures that the compiler can find the JAXP classes.

  3. When you run the application, specify the classpath so that the application can load the correct JAXP class files.

    Note that the first path in the classpath is the current directory.

    % java -cp .:jaxp-root/dom.jar:jaxp-rootjaxp-api. \
    jar:jaxp-rootsax.jar:jaxp-rootxalan.jar:jaxp-root/xercesImpl \
    .jar:jaxp-root/xsltc.jar source-filename arguments

    Now that your environment is configured, you can develop your application.