Compiling and running the GoISyncConsole sample Java synchronization application

GoISyncConsole is a Java sample application to demonstrate the use of the DB2 Everyplace Sync Client Java API.

File contents for GoISyncConsole

Prerequisites

Procedure

  1. Compile the GoISyncConsole application:

    This requires the isync4j.jar file, which is one of the Sync Client binaries.

    1. Open a command prompt.
    2. Type the following command:
      javac -classpath isync4j.jar *.java
      
  2. Set up the environment:

    The path environment must be setup so that the Sync Client binaries can be located.

  3. Run the sample:

    GoISyncConsole can be used with either the C client or with the Java DB2j client. A property file is used to determine which client to use. Sample properties files for both DB2e and DB2j are provided.

    The application starts with a text menu containing the following options:

  4. Specify option (3) to configure the server settings. This option will allow you to specify the Sync Server's IP address, your sync user name and password, and other options.
  5. Specify option (1) to perform the synchronization.

    The GoISyncConsole application creates another property file called ISync.properties to save your preferences. If you change a property in isyncdb2e.properties or isyncdb2j.properties, you should delete ISync.properties before you rerun GoISyncConsole to ensure that the new changes go into effect.

Související koncepce