XMLBeans 环境变量设置

Windows Setup

On Windows, do the following:

  1. Right-click My Computer, then click Properties.
  2. On the Advanced tab, click Environment Variables.
  3. Add an XMLBEANS_HOME variable whose value is the XMLBeans location.

    For example, if you downloaded the XMLBeans release to the root of your C drive, this might be c:\xmlbeans-1.0.2.

  4. Edit the PATH variable so that it includes the bin directory of your XMLBeans installation. For the XMLBeans release, you could add %XMLBEANS_HOME%\bin.
  5. Edit the CLASSPATH variable to include the xbean.jar included with XMLBeans.

    This is located in the lib directory. If you built XMLBeans from source, you can also use the JAR file in the build/ar or build/lib directories.

  6. For XMLBeans V2, also include the jsr173_1.0_api.jar (or jsr173_api.jar, whichever one came in your download) to the CLASSPATH variable.

    This is found in the lib (or build/lib if you built XMLBeans from source) directory.

UNIX/Linux Setup

On UNIX/Linux, update your environment as follows:

  1. export XMLBEANS_HOME=<location of XMLBeans root>
  2. export PATH=$PATH:$XMLBEANS_HOME/bin
  3. export CLASSPATH=$XMLBEANS_HOME/lib/xbean.jar:$CLASSPATH

    (or, if you built XMLBeans from source, export CLASSPATH=$XMLBEANS_HOME/build/lib/xbean.jar:$CLASSPATH)

  4. For XMLBeans V2, export CLASSPATH=$CLASSPATH:$XMLBEANS_HOME/lib/jsr173[_1.0]_api.jar

    (or, if you built XMLBeans from source, export CLASSPATH=$CLASSPATH:$XMLBEANS_HOME/build/lib/jsr173[_1.0]_api.jar)

Your updates might look like this:

export XMLBEANS_HOME=/home/me/xmlbeans-2.1.0
export PATH=$PATH:$XMLBEANS_HOME/bin
export CLASSPATH=$XMLBEANS_HOME/lib/xbean.jar:$XMLBEANS_HOME/lib/jsr173_1.0_api.jar:$CLASSPATH

Once you've updated your environment paths, you should be set up to use the tools that come with XMLBeans. These include a schema compiler, an instance validator, and more.

你可能感兴趣的:(C++,c,windows,linux,unix)