Cognitive Tutor Authoring Tools 2.6 > Using the Tools > Generalizing an example-tracing tutor with formulas > Installing the Formula Builder

5.2. Installing the Formula Builder

5.2.1. Windows XP
5.2.2. Mac OS X

The Formula Builder requires access to Java SDK documentation to display descriptions and synopses of Java methods. Install this documentation by following the steps for your operating system (Windows or Mac OS X) below.

5.2.1. Windows XP

Installing the Formula Builder on Windows XP

In the following steps, you will identify the version of Java being used to run CTAT, and download a JDK of the same version. You'll then run an installer from within CTAT that copies files from the JDK to CTAT. The Formula Builder will then create Java documentation based on JDK source files.

  1. Identify the version of the Java Runtime Environment (JRE) being used to run CTAT. You can find this by opening CTAT's about window (Help > About), and looking for the line beginning "Using Java version:" (e.g., "1.5.0_10").

  2. Download and install the Java Development Kit (JDK) of the same version identified in the preceding step. For example, if you identified the JRE version as 1.5.x, you'd download and install JDK version JDK 5.0.

    [Important]Important

    During the JDK installation, be sure to include the Java source for installation.

  3. Launch CTAT for Java.

  4. Open an existing behavior graph.

  5. On any link in the graph, click the link's title and select Edit Student Input Matching.

  6. Choose the Formula Match matcher.

  7. Click the Fx button (the formula builder). The Javasrc Installer dialog appears. (If the dialog does not appear, but the Formula Builder appears, you may have already configured the Formula Builder. If nothing happens, even after a pause, there may be a mismatch between the JRE and JDK versions. Contact us for more help.)

  8. In the Javasrc Installer dialog, click Browse to locate the directory in which you installed the JDK.

    Figure 2.16. Javasrc Installer with JDK location entered

    Javasrc Installer with JDK location entered

    If you select a JDK, CTAT will inform you that files were copied successfully, but CTAT must be restarted.

  9. Dismiss the success dialog and exit CTAT. If prompted to save the modified behavior graph, you can select No.

  10. Launch CTAT for Java, and repeat steps 4-7 above to open the Formula Builder. The "Fx" button will remain depressed for at least a few seconds as CTAT builds the documentation for the Java methods.

    If the Formula Builder does not open and nothing happens, you might have a mismatch between the JRE and JDK versions.

    If the Javasrc Installer appears again, you may not have chosen a valid JDK.

    Figure 2.17. Formula Builder on Windows XP

    Formula Builder on Windows XP

5.2.2. Mac OS X

Installing the Formula Builder on Mac OS X

In the following steps, you will identify the version of Java being used to run CTAT, and download the Java Development Kit (JDK) source of the same version. You'll then extract a few source files from the JDK to CTAT. The Formula Builder will then create Java documentation based on JDK source files.

[Note]Note

Although both the Java Runtime Environment (JRE) and Java Development Kit (JDK) are included on Mac OS X by default, the source code for the JDK is not included and must be downloaded separately.

  1. Identify the version of the Java Runtime Environment (JRE) being used to run CTAT. You can find this by opening CTAT's about window (Help > About), and looking for the line beginning "Using Java version:" (e.g., "1.5.0_10").

  2. Download and install the JDK source code of the same version identified in the preceding step. For example, if you identified the JRE version as 1.5.x, you'd download JDK source code for version 5.0.

    Go to http://connect.apple.com and log in (create a free account if you don't have one already). Choose the 'Downloads' link, then the 'Java' link. Download and install 'J2SE 5.0 Release 5 Developer Documentation' (assuming you're using Java 1.5). This installs src.jar, which you will need in the next step.

  3. Extract two source files (the "String" and "Math" classes) from src.jar to the {CTAT}/javasrc directory.

    To do this, open a terminal window, and cd to any directory for which you have "write" permission (e.g., your home directory). Enter the following on the command-line:

    jar -xf /System/Library/Frameworks/JavaVM.framework/Home/src.jar  \
            src/java/lang/String.java src/java/lang/Math.java

    This should create a directory named src in the current directory. Copy the java folder from the src directory to the {CTAT}/javasrc directory.

  4. Launch CTAT for Java.

  5. Open an existing behavior graph.

  6. On any link in the graph, click the link's title and select Edit Student Input Matching.

  7. Choose the Formula Match matcher.

  8. Click the Fx button (the formula builder). The "Fx" button will remain depressed for at least a few seconds as CTAT builds the documentation for the Java methods. The Formula Builder, shown below, should appear after a pause.

    If the Javasrc Installer dialog appears, you may not have copied the correct files in step 3.

    If nothing happens, even after a pause, there may be a mismatch between the JRE and JDK versions. Contact us for more help.

    Figure 2.18. Formula Builder on Mac OS X

    Formula Builder on Mac OS X