Project Code Base Synchronization

This topic provides an overview of synchronizing Java code base in a Java project.

Executing Java programs in Oracle databases using Oracle Java Virtual Machine (OJVM), requires loading the Java source files or Java classes and resources into the database schema. With OJVM support added for Oracle® Database Navigator plug-in, you can upload/download Java content from your Java project to a database connection and vice versa. This facilitates synchronization of your Java code base with the database connection within a project.

Follow these steps to load Java files into a database schema:
  1. In the IDE platform, open the Project folder that contains the Java class/source/resource files.
  2. Right-click the Java file and select DB Navigator > Upload to Database from the context menu.


    Upload to Database option

    The DB Navigator - Upload Java Content window opens.


    DB Navigator - Upload Java Content dialog box

  3. From the drop-down fields, select the Target Connection and Target Schema to which you want to upload the Java classes and resources.
  4. Select the required java content check box(es) from the files/resources listed in the Upload content section.
  5. Click Upload. The upload process begins. Once successfully completed, the DB Navigator - Java Upload Process window displays the status.


    DB Navigator - Java Upload Process dialog box

  6. Click Show Results to view all the Java classes and resources uploaded to the selected DB schema in the DB Navigator - Java Upload Result dialog box.


    DB Navigator - Java Upload Results dialog box

  7. Click Close.
  8. Open the DB Browser window and navigate to the target DB schema to verify the uploaded Java content.


    Verifying Java upload process

To download Java files and Java resources from a database schema to your project folder:
  1. Open the DB Browser window and navigate to the Java class file/source file or Java resource in the DB schema.
  2. Right-click the Java content you want to download and select Download to Project option from the context menu.


    Download to Java project option

    The DB Navigator - Download Java Content window opens.


    DB Navigator - Download Java Content dialog box

  3. Select the Target Module (of the project) where the Java files will be compiled and deployed.
  4. Select the Project root folder from the Target Content Root field.
  5. Select the check boxes next to the files contained in the Java class that you want to download in the Download content section.
  6. Click Download. Once the download process is successfully complete, the DB Navigator - Java Download Process window opens displaying the status.


    DB Navigator - Java Download Process window

  7. Click Show Results to open the DB Navigator - Java Download Result dialog box that lists all the Java classes/resources that were created or updated in your project.


    DB Navigator - Java Download Results dialog box

  8. Double-click any of the listed files to open them in Java editor window or click Open All/Open Selected.
  9. Open the project folder in your IDE platform to verify the classes/resources are added to the specified project folder location.


    Verifying Java download to project process