Deploying a JClient application and ADF Business Components as a simple archive is supported in Oracle JDeveloper. To do this, create a single JAR file containing both your Oracle ADF Business Component logic and the client application files.
To deploy JClient and Business Components as a simple archive:
Note: In the Database Connection Wizard - Step 2 of 4: Authentication, the Deploy Password checkbox must be selected.
Create a Business Components project using the Business Components from Tables Wizard.
In a new project, create a JClient application.
In the JClient project, create a JAR File deployment profile.
In the JAR Deployment Profile Properties dialog, select File Groups and click New.
In the Create File Group dialog, select De pendency Analysis and enter the name of file group (for use in the dialog only).
In the dialog navigator list, select Contributors and select all of the libraries that appear in the list.
Note: When packaging a JClient application that
will run against remote ADF Business Components, the
servlet.jar
must appear in the list of selected contributor
libraries. See
Packaging a JClient Application for Deployment Against Remote ADF Business
Components for details.
To make an executable JAR file, select JAR
Options in the dialog navigator and enter the fully qualified
class name of the JClient form that contains the main()
method.
Note that this step specifies the application's entry point. If you
run the JClient appilcation and receive an exception similar to
Exception in thread "main" java.lang.NoClassDefFoundError: mypackage1/Panel1 @
at mypackage1.TestClass.main(TestClass.java:13)
, you must
manually add the entry point to the JAR file's manifest (for
example, Main-Class: mypackage1.Panel1
).
Click OK when you are done.
Right-click the profile and choose Deploy to JAR file.
The archive will be create and deployed to the location specified in the profile.
To test your client application, run the application from the
JDeveloper's installation directory <jdev_install>
/jdk/bin
. To invoke the application, enter java -jar <
name_of_application.jar>
.
Copyright © 1997, 2004, Oracle. All rights reserved.