Wednesday, July 17, 2013

How to create Deployment Profiles (JAR, EAR & WAR) using Jdeveloper


Packaging Applications using Jdeveloper

How to create Deployment Profiles (JAR, EAR & WAR) using Jdeveloper

JAR files are Java Archives, JAR files are bundled with all java classes that end in .jar, If you want to allow other applications to access your java classes, then create JAR file and add them into class path.

WAR files are Web Application Archives. WAR files are JAR files that end in .war and are used to package and deploy web components into web containers. They can contain HTML documents, servlets, JSPs, or even applet class files. WAR archives also contain an XML file called a deployment descriptor that describes the components. This file is normally called web.xml.


An EAR file is an Enterprise Archive and is used to package modules of a J2EE application. An EAR file is a JAR file that ends in .ear and can contain JAR and WAR files in addition to any other file required by the module. EAR archives also contain a file describing their contents—called an application descriptor, typically, application.xml.

Jdeveloper allows to create these files very simple manner.

Creating JAR file using Jdeveloper

- Right click on any Java project, Project Properties, You will see below window.

- Choose 'Deployment' on left hand side menu, Click on 'New' button, Choose 'JAR File' from 'Archive Type' list of values , Give appropriate name for the JAR file, Click on Ok button

- Here give the JAR file path where you want to create, Click on 'Ok' in following steps.

- After creating Deployment profile, then next step is to create the JAR file using the above created deployment profile
- Right click on the Java project (where JAR deployment profile created) , Choose Deploy , Then select the deployment profile created in above step, then choose 'Ok' in following steps, After successful compilation Jeveloper will create JAR file at the specified location.. You will see a message as shown in below screen shot.

WAR Deployment Profile

Right click on the web project, Follow all the above steps, Choose 'WAR File' while creating deployment profile and rest of the steps are same as mentioned above.

EAR Deployment Profile

Right click on the application, Follow all the above steps, Choose 'EAR File' while creating deployment profile, rest of the steps are same as mentioned above.


1 comment: