Use Commons-net to do FTP function exception java.lang.ClassNotFoundException:org.apache.oro.text.regex.Malformed

Source: Internet
Author: User

Recently use Apache Commons-net.jar do ftp upload download function, click "Upload" when the error, as follows:

1  Java.lang.ClassNotFoundException:org.apache.oro.text.regex.Malformed

Online search, there are two ways, 1: Maybe the local Windows XP jdk is 1.6.15 Yi, packaged, Use the 1.6.15 JDK to run an error, and replace it with a JDK higher than jdk1.6.15 to run; 2. Missing Jakarta-oro-2.0.8.jar file.

At first, I tried to get my colleagues to run with a different version of the JDK, and my colleague reminded me that it might be a jar conflict and then go check it and discover that there are two versions of Commons-net.jar under the project. One is the Commons-net-1.4.1.jar already existing in the previous project, and one is the current Commons-net-3.1.jar. First try to delete the Commons-net-1.4.1.jar from the project, and then run the project, click "Upload" Success no more error, run normally.

After consideration, the jar package can be backwards compatible, so Commons-net-3.1.jar can replace the Commons-net-1.4.1.jar, so that deleting a jar package will not affect the other parts of the project.

Use Commons-net to do FTP function exception java.lang.ClassNotFoundException:org.apache.oro.text.regex.Malformed

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.