Importing JAR, WAR, EJB JAR, client
application JAR, and RAR files
About this task
You can use the Import wizard to add JAR, WAR, EJB JAR,
client application JAR, and RAR files to your enterprise project.
Procedure
Right-click your project and select Import.
Select the type of file you want to import:
Application Client JAR file
EAR file
EJB JAR file
J2EE Utility Jar
RAR file
Shared EAR file
WAR file
Follow the steps to import your selected type of file:
Application Client JAR file:
In the Application Client Import page, beside the Application
Client file field, click Browse to
locate the file you want to import. When the file is added, the name
of the imported project appears in the Application Client
project field. You can change the name of the project
by typing in a different name. Select Add project to an
EAR and provide a name for the EAR file (the default is
derived from your <project_name> + EAR).
Click Finish.
EAR file:
In the Enterprise Application Import page, beside the EAR
file field, click Browse to locate
the file you want to import. When the file is added, the name of the
imported project appears in the EAR project field.
You can change the name of the project by typing in a different name.
Select your preferred target runtime in the Target Runtime field,
and click Next.
In the Enterprise Application Import page, in the Utility
jars and web libraries field, select the additional jars
you want to include in your project, and click Finish.
EJB JAR file:
In the EJB JAR Import page, beside the EJB JAR file field,
click Browse to locate the file you want to
import. When the file is added, the name of the imported project appears
in the EJB project field. You can change the
name of the project by typing in a different name. Select Add
project to an EAR and provide a name for the EAR file
(the default is derived from your <project_name> + EAR).
Click Finish.
Java EE Utility Jar:
On the Utility Jar Import page, in the Select EAR Project field,
ensure that your project appears, or type a new project name. In the Select
import type field, select one of the following options:
Create Java™ Projects from
Utility Jars
Create linked Java Projects
from Utility Jars
Copy Utility Jars into an existing EAR from an external location
Create Linked Utility Jars in an existing EAR from an external
location
In the Project import options field,
you can select Override Project Root (Specify location
below), and type an alternative project location, or click Browse to
locate a directory in your file system. Click Next.
On the Utility Jar Import page, click Browse to
locate the director that contains the utility jar files that you want
to import. In the Utility Jars and Web libraries field,
select the files that you want to import. Click Finish.
RAR file:
In the Connector Import page, beside the Connector
file field, click Browse to locate
the file you want to import. When the file is added, the name of the
imported project appears in the Connector module field.
You can change the name of the project by typing in a different name.
Select Add project to an EAR and provide a
name for the EAR file (the default is derived from your <project_name>
+ EAR).
Click Finish.
Shared EAR file:
In the Shared EAR Import page, beside the EAR file field,
click Browse to locate the file you want to
import. When the file is added, the name of the imported project appears
in the EAR project field. You can change the
name of the project by typing in a different name. Select your preferred
target runtime in the Target Runtime field.
Click Finish.
WAR file:
In the WAR Import page, beside the WAR file field,
click Browse to locate the file you want to
import. When the file is added, the name of the imported project appears
in the Web project field. You can change the
name of the project by typing in a different name. Select Add
project to an EAR and provide a name for the EAR file
(the default is derived from your <project_name> + EAR). Click Next.
On the WAR Import: Web Libraries page, select any Web libraries
you want to add to your project. Click Finish.