Executing the Java Examples
Here are the instructions for executing the Java example code discussed in the Using Java section of the tutorial:
If you have not already done so, use MVIMPORT to import the sample Universe account. Read Migrating a MultiValue Application for instructions.
If you have not already done so, run PROTOCLASS on the PERSON file. For instructions, see Running PROTOCLASS.
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 Studio. In Studio, compile GETVALUE.mvb.
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.
Ensure that both cachedb.jar and cachejdbc.jar are on the class path. These files are in <cachesys>\Dev\java\lib\JDK17.
Edit the example files to update the Caché connection information so that it is correct for your system.
Compile and execute the example files.
All of the files (.java and .xml) mentioned above are in <cachesys>\Dev\tutorials\mv .