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:
- 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.
- Creating a BC4J Project using
the Business Components Package Wizard.
- In a new project, create a JClient
application in JDeveloper.
- With the JClient project selected in the JDeveloper Navigator, right-click
<client_project_name>
and choose New to display the New Object
dialog.
- In the Navigator, select the
<projectname>.jpr in which you
want to create the Loadjava and Java Stored Procedure deployment profile.
- Choose File | New
to open the New Gallery.
- In the Categories tree, expand General
and select Deployment Profiles.
- In the Items list, double-click
Simple Archive.
- Click OK.
- 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.
- Click Save.
The Simple Archive Deployment Profile Settings
panel displays. Configure the settings for each page as appropriate:
- Files Page
- JAR Options Page
- 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:
- Business Components libraries: select the Workspace<projectname>
and
classes
- Oracle JDBC:
classes12.zip
and nls_charset12.jar
- Connection Manager:
jdev-cm.jar
- JClient Runtime:
bc4jui.jar
- Oracle XMLParser v2:
xmlparserv2.jar
- JDeveloper Runtime:
jdev-rt.jar
- BC4J Runtime: select all files in this library (excluding those you've
already selected)
Note: If you are using Oracle interMedia in your client
application, you must also select the Oracle interMedia library from this
list.
- 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.
- (Advanced) Filters Page:
further refinement to the Dependency Analyzer settings
- (Optional) Profile
Dependencies Page: if the deployment
profile depends on J2EE modules from another deployment profile.
- Click OK when you are done.
The newly created simple archive deployment profile icon appears in the
Navigator below the specified project.
- Select and right-click
<simple archive deployment profile> in the Navigator.
- 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.
- (Optional) If you want to edit the simple archive deployment profile
settings, right-click
<simple archive deployment profile> and choose Settings.
- (Optional) To see a listing of the files contained in the JAR file,
right-click
<simple archive deployment profile> and choose Preview
from the context menu.
- 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:
- If you want to install the client application on another machine(s), be
sure to install JDK 1.3 or JDK 1.4 in the
jdk1.x/bin
directory.
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