A WAR is a JAR laid out for the purpose of distributing a webapp. If you design the webapp using Sun's recommended directory structure and including a WEB-INF/web.xml file then when you jar it, you've created a WAR file (you DO have to name it ending with .war as well).
jar is like ZIP - unless you give orders to the contrary, the resulting archive file will map the directory structure of the original files, so a
"java -d abc *.java" if your files are located in the current directory but have package names as listed will produce (assuming directory "abc" exists:
if you were to jar like this:
jar cf myjar.jar abc
You'd build a defective jar, since the "abc" directory level would be included in the jar's directory structure. What would work would be:
cd abc
jar myjar.jar *
But you'd then end up with "myjar.jar" in the abc directory.
Actually, for complex projects it's easier to use
Ant, which can be used to compile the java files and create the jars and wars.
Jars WITHIN a WAR are placed in the root of the WAR for jars to be downloaded to the client and in the WEB-INF/lib directory for jars used by the server code. You can place downloadable jars in alternative locations if you set up the proper URLs for the jars.