1.3.5.1 Installing the Java Client

The prerequisites for installing the Java client are:
  • A Unix-based operation system (such as Linux) or macOS or Microsoft Windows
  • Oracle JDK 11
  1. Download Oracle Graph Client 21.3 from Oracle Software Cloud.
  2. Unzip the file into a directory of your choice.
  3. Configure your client to trust the self-signed server certificate. See Configuring a Client to Trust the Self-Signed Certificate for more information.
  4. Connect to the graph server (PGX) using the graph shell for Java as shown:
    cd <CLIENT_INSTALL_DIR>
    ./bin/opg4j --base_url https://<host>:7007 --username <graphuser>
    

    In the preceding code:

    • <CLIENT_INSTALL_DIR>: Directory where the shell executables are located.

      Note:

      The shell executables are generally found in /opt/oracle/graph/bin after server installation, and <CLIENT_INSTALL_DIR>/bin after the client installation.
    • <host>: Server host
    • <graphuser>: Database user

      You will be prompted for the database password.

    Note:

    The default graph server (PGX) port is 7007. If needed, you can configure the graph server to listen on a different port by changing the port configuration in server.conf file. See Configuring the In-Memory Graph Server (PGX) for more information.

    The Java shell starts and the following command line prompt appears as shown:

    For an introduction type: /help intro
    Oracle Graph Server Shell 21.2.0
    Variables instance, session, and analyst ready to use.
    opg4j>

    See Interactive Graph Shell for more information on the Java client.