• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar & war files

 
Nagarajan Krishnamurthy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 questions :
1.When do we go for jar files and when do we go for war files.And whats the difference between web-inf & meta-inf folders
2.Is there any tool which generates the DD files automatically other than weblogic builder.
 
Amol Fuke
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jar files are basically library files needed for your project while war files are web archieve files where your actual code is.Your code in the war file may use some libraries from the jar files.
We deploy war file and put jar files in the classpath.

Every server has its own UI for building DD.
 
Senthil Somasundaram
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1.When do we go for jar files and when do we go for war files.And whats the difference between web-inf & meta-inf folders


war file represent a web module in your application.

Use jar files to bundle up the java classes.Example Ejb-jar will contain
the ejb classes.

web-inf folder is needed to build a web module.This folder will contain the web.xml which configure container for your web application.

meta-inf folder will have your deployment descriptor.Ex in ejb folder structure meta-inf directory will have the deployment descriptor for your EJB's.

2.Is there any tool which generates the DD files automatically other than weblogic builder.

Sun ONE Studio will create DD automatically.

Hope this will help you.

Cheers,
Senthil
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. We use war files when we package a Web Application. We use Jar files for any Java archive, including an EJB archive. Both War files and EJB Jar files have a structure defined by the J2EE specification. War files will use WEB-INF, EJB Jar files will use META-INF.

2. Plenty. Any Java IDE worth its salt should do this - see JBoseIDE, MYEclipse, JBuilder etc.

(look at that - three answers at once)
[ October 04, 2005: Message edited by: Paul Sturrock ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic