Skip to main content

Example and Exercise Files

The Caché installation includes all files necessary to execute the example code and complete the exercises.

The <cachesys>\dev\tutorials directory contains two XML files:

  1. JAVTutorial.xml — This file contains the completed Caché classes for the Contact Management application. This version of the application is intended for those who do not wish to work through the instructions in the tutorial for completing the classes.

  2. JAVTutorialB.xml — This file contains incomplete versions of the Caché classes for the Contact Management application. This version of the application is intended for those who wish to work through the instructions in the tutorial for completing the classes. Prior to starting the tutorial, install this version into the USER namespace or whatever namespace you will be working in.

Install either JAVTutorial.xml or JAVTutorialB.xml into the USER namespace, or any other namespace, by completing the following steps:

  1. Start Caché Studio.

  2. Click Change Namespace on the File menu to connect to the namespace into which you want to load the application.

  3. Click Import Local on the Tools menu, and choose XML. Then browse to <cachesys>\dev\tutorials.

  4. Select the file JAVTutorial.xml (JAVTutorialB.xml), click Open, and then click OK.

The <cachesys>\dev\tutorials\java directory also contains the following files and directories necessary for completing the exercises and executing the demonstration code:

  1. BindingExamples.java — Java source file for the code examples in the Java Binding part of the tutorial

  2. BindingExercisesSolutions.java — Java source file containing the solutions for the exercises for the Java Binding part of the tutorial

  3. BindingExercises.java— Java source file containing the class definition with stub methods to be completed in the exercises for the Java Binding part of the tutorial

  4. JDBCExamples.java — Java source file for the code examples in the JDBC part of the tutorial

  5. JDBCExerciseSolutions.java — Java source file containing the solutions for the exercises in the JDBC part of the tutorial

  6. JDBCExercises.java — Java source file containing the class definition with stub methods to be completed in the exercises for the JDBC part of the tutorial

Note:

In a standard Windows installation <cachesys> is C:\InterSystems\Cache. In a standard UNIX® or Linux installation it is /usr/cachesys.

When compiling the Java source files for the exercises and examples, Contact.java and PhoneNumber.java must be compiled before the other files. The resulting class files should be left in the JavaTutorial subdirectory.

For general information concerning compiling and executing Java programs, please consult The Java TutorialsOpens in a new tab.

FeedbackOpens in a new tab