go to the folder in which you have files to include in .war. type-> jar -cvf pets.war * Which means, "compress everything in this directory into a file named pets.war" (c=create, v=verbose, f=file)
Or If u want only some files, specify file names separated with ,(comma) in place of '*'.
Sowjanya Chowdary
Ranch Hand
Joined: Aug 22, 2005
Posts: 35
posted
0
sorry i forgot to mention : you have to type "jar -cvf pets.war *" at command line.
gino jersey
Greenhorn
Joined: May 24, 2005
Posts: 21
posted
0
i tried what you said: "jar -cvf myWar.war"
but i got a message saying command" jar is unrecognized. what am i missing?
my jar command is in C:\JBuilderX\jdk1.4\bin
but files and folders i want to archive are in: C:\apimswebapps\apimsprdCTC007
what should i do?
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
Put C:\JBuilderX\jdk1.4\bin in your PATH.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
shoeb sayyed
Ranch Hand
Joined: Mar 14, 2010
Posts: 48
posted
0
i did jar-cvf -MyWar.war home.html WEB-INF;
it is not getting deployed on weblogic
how do it do it?
Thanks,
Shoeb
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
4
posted
0
Is there a space after "jar"? Read this FAQ please.
suppose your deployment directory is "VoterApp" that is present in "d:\" then you go to that location from command prompt. After you type the below given....
d:\VoterApp>jar cf VoterApp.war .
here
c--->create war file
f---->specify the war file name
. --->dot represents the current directory.It tells us take everything of current directory and create war file of that aplication.
another precation is that you must give space between VoterApp.war and .(dot).
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
4
posted
0
Welcome to the Ranch
Are you sure he is still trying to make that war file?