Meaningless Drivel is fun!
The moose likes EJB and other Java EE Technologies and the fly likes war prob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "war prob" Watch "war prob" New topic

war prob

indrajit bose

Joined: Nov 29, 2001
Posts: 13
can any1 plz tell me how to create a war file manually or using j2sdkee1.3 deployment writing the command jar -cvf archivename.war but its saying that i should also mention the files that the archive should contain.
thanx in advance
Rick Hightower
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
Use ant.... it has a war task.

Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
You're almost there, and if you want to manually create a WAR file (provided that you have a directory that you want to WAR up) just change directory to it and type...

Notice the "." at the end of the command, this says include all of the files in the current directory. Alternatively, you can include specific files and directories by simply naming them. Check out the JAR tool documentation (for Windows) or the JAR tool documentation for Solaris/Linux as appropriate.
Once you've done this a few times, as Rick suggested, you'll probably want to check out an automated tool such as Ant.
All the best
I agree. Here's the link:
subject: war prob
jQuery in Action, 3rd edition