Configure your environment for Ghost Client

This topic provides information about how to configure your environment to use the Ghost Client.

About this task

The procedure in this topic shows you how to configure your environment so that Ghost Client can use Java.

Before you begin:
Important: Before you can run scenarios with the GGC, you need to set up your PATH and CLASSPATH environment variables as described in the next steps.
  1. Set your PATH environment variable to include the Java Development Kit bin directory. On Linux®/UNIX™/MAC®:

    export PATH= /path-to-jdk/bin:$PATH

    On Windows®:

    set PATH = C:\path-to-jdk\bin;%PATH%

  2. To be able to compile and run test scenarios from any directory on your disk, set your CLASSPATH environment variable to the absolute path to the ggc.jar and fgl.jar files.
    Note: You can also specify the path to jar libraries directly at the command line using the Java -classpath (-cp ) option, see Example using Java -cp option below.
    On Windows:

    set CLASSPATH = C:\path-to-the-ggcdir\ggc.jar;C:\path-to-fgldir\fgl.jar

    On Linux/UNIX/Mac®:

    export CLASSPATH =/path-to-the-ggcdir/ggc.jar:/path-to-fgldir/fgl.jar

    Note: CLASSPATH references the jars needed by the GGC. You can compile and run your scenarios as shown in these examples:
    • Compiling: javac userWorkspace/path/to/generated/.*java
    • Running: java com.fourjs.ggc.Launcher -s userWorkspace.path.to.generated.UserClass -u http://application/url
An alternative to setting the CLASSPATH environment variable is to specify the absolute path to the ggc.jar file using the java -classpath (-cp ) option at runtime. Below are some examples.

On Linux/UNIX/Mac:

On Windows:

For more information on -classpath (-cp ) option, see the Java documentation.