Setting Up Your Java Environment
- Last Updated: April 14, 2026
- 1 minute read
If you are using XCC/J, you must have Java installed on your client machine. You must also follow these steps to set up your environment to run the sample applications:
-
Set your
JAVA_HOMEenvironment variable, if it is not already set. For example, if you are running a Windows machine, setJAVA_HOMEin a command window like this:set JAVA_HOME=c:\Sun\SDK\jdk -
Substitute the directory in which Java is installed in your environment.
-
Set your
CLASSPATHenvironment variable correctly, or use the-classpathoption to pass the appropriate classpath on the command line. Make sure to use the correct name for themarklogic-xcc-N.jarfile in yourCLASSPATH, where N corresponds to the service release version number.