Java projects How to fight the war package

Source: Internet
Author: User
Tags command line pack tomcat

Recently good busy good busy, sorting out the mood for everyone to share under their work encountered a little skill, hope to meet the same trouble students a little help.

We know that the Java Project War package can be automatically packaged in the Eclipse and MyEclipse tools, right, and then export the war package, but I found that one of my projects was a little bit of a hassle during the war package, and after the exported war package was opened, there was a lot less. Obviously there is a problem. Then how to do it, online search a lot of folk remedies have no effect, consult colleagues, we have not encountered this situation.

In addition to this approach, we can use the DOS command to manually play the war package:

First, open the DOS command line, type "jar", we found that it is not an internal or external command such as the error, it is probably your Java environment is not configured, we can use the Java_home method or directly in the path configuration, and so configured, (note your JDK version, There is a jar.exe and Javac.exe version suitable) We then typed "jar", the following effect will appear, indicating that the configuration was successful.

Let's go to your project with a DOS command.

Okay, now we're going to run the commands and pack them manually

Enter and wait for it to run automatically:

OK, pack it up, now let's look at the war package under the directory

It's already done, we put it under Tomcat's WebApps, start Tomcat, and unzip it automatically. OK, that's it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.