Creating war file with jar command not working properly

Hi all, I used the following command to create a war file from my spring project.

D:\projectsample\webContent>jar cvf projectsample.war

The war file is generated, but when I deploy it using jettyrunner.jar it is not deployment. I noticed in the war file that there are no class files in the WEB-INF \ class folder. Can someone suggest I have a solution for this problem.

+3
source share
2 answers
Team

"jar" does not create .class files, it is intended to create a package. Therefore, you must first compile the source files, and then use the jar command.

In addition, you may need to add the files you want to include as parameters (s), something like

jar cvf myapp.war *

To add all files.

+7

i.war Java

1. Jdk

2. JAVA_HOME Inviroment

3.cmd = >

4. c:\user> Cd D:\apex_listener

5. D:\apex_listener> jar -cvf0 D:\apex_listener\i.war -C Y:\APPLICATION_EXPERESS\apex_4.2.2_en\apex\images .

+1

All Articles