You can migrate an existing application client JAR file to an assembly
tool by importing the JAR file.
Before you begin
This article assumes you have assembled an application client JAR
file and want to work with it in an
assembly
tool such as the Application Server Toolkit (AST) or Rational Web Developer.
This
article also assumes that you have started
the assembly tool and have configured
the assembly tool for work on Java 2 Platform, Enterprise Edition (J2EE)
modules.
Why and when to perform this task
Importing an existing application client JAR file into an assembly
tool migrates the JAR file to the assembly tool so you can further configure
and assemble an application client.
Steps for this task
- Click File > Import > App Client JAR file > Next.
Alternatively, you can right-click Application Client Projects in
a view such as the Project Explorer view and click Import > App Client
JAR file. Or, on Windows platforms, you can drag the application client
JAR file and drop it on a view.
- In the Import dialog, specify the application client file and project
name:
- Specify the application client JAR file to be imported.
Use Browse to locate the JAR file and specify its full path name.
- Specify an application client project name. For
example, if you are importing the HelloWorld.jar file, you might
name the project HelloWorld. Click New and specify HelloWorld for
the project name.
- Select a target server. To use application assembly
services of WebSphere Application Server, select the WebSphere Application
Server v6.0 target server.
- If you want to add application client components to an enterprise
application (EAR file), select Add module to an EAR project.
- Specify a new or existing enterprise application (EAR) project
to be associated with your application client project for purposes of deployment.
Select an existing enterprise application project from the drop-down
list or type a new project name. Or, click New and create a new enterprise application. Note that if you type
a new EAR project name, the EAR project is created in the default location
with the lowest compatible J2EE version based on the version of the project
being created. If you want to specify a different version or a different location
for the enterprise application, you must click New and create a new
enterprise application.
- Optional: If you are creating a new enterprise application
project or if you have no module dependencies to specify, skip this step.
Otherwise, click Next to specify module and JAR file dependencies.
On the Module Dependencies page, select dependent JAR files or modules
within the associated enterprise application project. This updates the runtime
class-path and Java project build path with the appropriate JAR files. Application
client modules, EJB modules, and Web modules can all have dependencies on
EJB modules or utility JAR files. Modules cannot depend on WAR or application
client JAR files.
- Click Finish.
Result
A new application client project is created, reflecting the J2EE folder
structure that specifies the location of application client content files,
class files, class paths, the deployment descriptor, and supporting metadata.
Files for the application client project are shown in the Project Explorer
view under
Enterprise Applications and
Application Client Projects.
What to do next
After importing an application client project, you can
edit the application client deployment descriptor if default
properties are not sufficient. In the Client Deployment Descriptor editor,
you can add enterprise bean, resource, or resource environment references
as well as view and edit source code.
For more information, see the online
help for the assembly tool. Similar information is in the Application Server
Toolkit information center available with this information center. Click Application
Server Toolkit > J2EE applications > Defining J2EE application clients.