Using the Java JDK you can use the jar command to create a war file:
jar -cvf /tmp/mywar.war *
There is a way to work with .jar
files with the Java JRE but can you create jar or war files with it?
/path_to_java/java -jar ???
No. The JRE does not ship with jar.exe
.
In order to create jar or war files you need to install the JDK.