MultiValue Quick Start Tutorial
Executing the Java Examples
[Back] 
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Search:    

Here are the instructions for executing the Java example code discussed in the Using Java section of the tutorial:

  1. If you have not already done so, use MVIMPORT to import the sample Universe account. Read Migrating a MultiValue Application for instructions.
  2. If you have not already done so, run PROTOCLASS on the PERSON file. For instructions, see Running PROTOCLASS.
  3. For RunRoutine.java, import MVExample.Search and GETVALUE.mvb into the MyAccount namespace. Both the class and the routine are stored in MVExample.xml. For instructions on importing a Caché class from a local XML file, see Importing and Exporting Caché Documents Locally in the Introduction to Using Caché Studio. In Caché Studio, compile GETVALUE.mvb.
  4. For the Java Projection examples, DisplayPersons.java and AddPerson.java, generate and compile a Java projection for MVFILE.PERSON. For RunRoutine.java generate and compile a projection for MVExample.Search. The directory containing the generated Java projections (MVFILE) should be a child of the directory containing the example Java files. For instructions, see Generating Java Projections.
  5. Ensure that both cachedb.jar and cachejdbc.jar are on the class path. These files are in <cachesys>\Dev\java\lib\JDK17.
  6. Edit the example files to update the Caché connection information so that it is correct for your system.
  7. Compile and execute the example files.
Note:
All of the files (.java and .xml) mentioned above are in <cachesys>\Dev\tutorials\mv .