Sun Cluster Data Services Developer's Guide for Solaris OS

ProcedureHow 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 http://java.sun.com/xml/jaxp/index.html.


    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.