Deploying JClient and BC4J as a Simple Archive

Deploying a JClient application and Business Components for Java (BC4J) as a simple archive is supported in Oracle9i JDeveloper. To do this, you would create a single JAR file containing both your business component for Java logic and the client application files.

To deploy JClient and BC4J as a simple archive:

  1. Make sure that a database connection to the data source exists.
    Note: In the Database Connection Wizard - Step 2 of 4: Authentication, the Deploy Password checkbox must be selected.
  2. Creating a BC4J Project using the Business Components Package Wizard.
  3. In a new project, create a JClient application in JDeveloper.
  4. With the JClient project selected in the JDeveloper Navigator, right-click project_icon <client_project_name> and choose New to display the New Object dialog.
  5. In the Navigator, select the project_icon <projectname>.jpr in which you want to create the Loadjava and Java Stored Procedure deployment profile.
  6. Choose File | New to open the New Gallery.
  7. In the Categories tree, expand General and select Deployment Profiles.
  8. In the Items list, double-click Simple Archive.
  9. Click OK.
  10. In the Profile Name field, enter or browse to the full path and name for this deployment profile.
    Note: The deployment profile is named with a .deploy filename extension.
  11. Click Save.
    The Simple Archive Deployment Profile Settings panel displays. Configure the settings for each page as appropriate:
    1. Files Page
    2. JAR Options Page
    3. Dependency Analyzer Page: The checkbox tree displays the list of libraries that are in your project's current active configuration. For this deployment, you want to repackage the contents of other libraries in your output JAR file to include the required libraries.
      Select the checkboxes next to the following libraries:
    4. Select the Include All of Their Contents in the Output radio button so that the entire contents in the selected libraries are included in the output JAR.
    5. (Advanced) Filters Page: further refinement to the Dependency Analyzer settings
    6. (Optional) Profile Dependencies Page: if the deployment profile depends on J2EE modules from another deployment profile.
  12. Click OK when you are done.
    The newly created simple archive deployment profile icon appears in the Navigator below the specified project.
  13. Select and right-click simplearchive_deployment_profile_icon <simple archive deployment profile> in the Navigator.
  14. Choose the Deploy to JAR option to display the JAR Deployment Profile Settings dialog from which you can choose the location for the simple archive. By default, the simple archive is deployed in the current project's deploy directory.
  15. (Optional) If you want to edit the simple archive deployment profile settings, right-click simplearchive_deployment_profile_icon <simple archive deployment profile> and choose Settings.
  16. (Optional) To see a listing of the files contained in the JAR file, right-click simplearchive_deployment_profile_icon <simple archive deployment profile> and choose Preview from the context menu.
  17. To test your client application, run the application from the JDeveloper's installation directory at the following location:
    <jdev_install>/jdk1.x/bin/jdk1.x/bin
    The command to run is as follows:
    java -jar <name_of_application.jar>
    If successful, the JClient application should run.

Note:


Related topics
Creating and Deploying a Simple Archive to the File System
Deploying an Executable JAR File
Copying BC4J Runtime Libraries to OC4J for Web Application Deployment