1.3.5.1.1 Installing the Java Client Using a Zip File

You can download the zip file in Oracle Graph Client 22.4 and install 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 or JDK 17

Note:

Due to a bug in Open JDK, which causes a deadlock when you attempt to copy and paste into a JShell session, it is recommended that you avoid the following Oracle JDK versions:
  • JDK 11.0.9
  • JDK 11.0.10
  • JDK 11.0.11
  • JDK 11.0.12
  1. Download Oracle Graph Client 22.4 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. Start the OPG4J shell to connect to the graph server (PGX) 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.

      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

      Note:

      The graph server (PGX), listens on port 7007 by default. If needed, you can configure the graph server to listen on a different port by changing the port value in the server configuration file (server.conf). See Configuring the Graph Server (PGX) for details.
    • <graphuser>: Database user

    You will be prompted for the database password.

    See Starting the OPG4J Shell for more information on the different ways you can start the OPG4J shell.

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

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

    See Also:

    Java API Reference for more information on the Java APIs