Java: duplicate name in manifest: Class-Path

Source: Internet
Author: User
Java: duplicate name in manifest: Class-Path

If your web is based on the struts model, this error may occur,
Java. util. Jar. Attributes read
Duplicate name in manifest: Class-Path

Although this does not affect the Web operationProgramPersonnel, it should be done.
I checked it on Google and found that the following webpage (in English) has a good explanation of this problem ,:
Http://www.deftcode.com/archives/duplicate_class_path_entries.html

I just want to focus on it.
1. The problem is in the Struts. jar file. We need to decompress it with WinRAR first, and we 'd better decompress it to the struts folder.
2, modify struts/META-INF/manifest. MF
Only one class-path is retained.
Class-path: commons-beanutils.jar commons-collections.jar commons-dbcp.jar commons-digester.jar commons-logging.jar commons-pool.jar commons-validator.jar jakarta-oro.jar
Each jar is separated by spaces.
3. Save manifest. MF to the struts folder,
Run cmd to enter the struts folder.
Command jar CMF ../manifest. MF struts. Jar
Now, the new struts. jar is available! Use this new struts. jar to replace the original one. Just restart tomcat.

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.