Although Google's guava a certain encapsulation of Java IO operations, but it is more in favor of the collection, concurrency and caching, in the actual project, I like guava very much, I also like the Apache Toolkit Org.apache.commons.io, which provides a very powerful tool capability that simplifies code logic, improves development efficiency and quality, and is a toolkit that every Java programmer should master. This article briefly introduce Org.a
In practice, we often encounter areas where pooling is needed, especially database connection pooling.Why do we need a pool? Because these resources are created, resources are consumed. Therefore, we use an object pool, which is pre-created with some resource objects. When we need to, we pull the object out of the pool, and when we don't need it, we return the object to the pool. This can improve the efficiency of your code's operation.Apache Commons
This article is fromBlog, please be sure to keep this source http://zhangjunhd.blog.51cto.com/113473/18331
Place the Apache commons-fileupload.jar under the WEB-INF \ Lib of the application. The following is an example of how to use its file upload function.The used fileupload version is 1.2, and the Environment is eclipse3.3 + myeclipse6.0. Fileupload is based on com
In Java projects, you often need to read configuration information from the configuration file. Common configuration files include properties files and XML files. This document takes reading the properties configuration file as an example.
The screenshot of the configuration file app. properties is as follows:
ftp.username=userOneftp.password=p@sswordftp.hostip=127.0.0.1ftp.port=21
Load and read the Configuration:
Import org. apache.
Exception in thread "main" java. lang. NoClassDefFoundError: org/apache/commons/logging/LogFactory, commonslogfactory
An exception occurred when learning Spring AOP from scratch when I was writing a Java Web framework:
"C: \ Program Files \ Java \ jdk1.7.0 _ 40 \ bin \ java"-Didea. launcher. port = 7533 "-Didea. launcher. bin. path = D: \ JetBrains \ xxIntelliJ IDEA 2016.3 \ bin "-Dfile. encoding = UTF-8-cl
Before using Runtime.getruntime (). Exec calls an external program, and under Tomcat there is a phenomenon where the current thread waits. In order to solve this problem, using the new thread to receive output information from external programs, see the blog http://blog.csdn.net/accountwcx/article/details/46785437 for details.Later on the internet found open source Java call external Program class library Apache C
Before using Runtime.getruntime (). Exec calls an external program. Under Tomcat there is a phenomenon where the current thread waits.In order to resolve the problem, the new thread was used to receive output information from the external program. Please see blog http://blog.csdn.net/accountwcx/article/details/46785437 for details.Later on the internet found open source Java call external Program class library Apache
Quartz error:Caused by: Java. Lang. nosuchmethoderror: org. Apache. commons. Collections. setutils. orderedset (ljava/util/set;) ljava/util/set;The reason is that the use of the commons-collections.jar version is too low caused by the use of 3.For those using myeclipse, if the commons-collections.jar is imported 3. * T
Apache Commons VFS Data:Example: http://www.zihou.me/html/2011/04/12/3377.htmlDetailed Example: http://p7engqingyang.iteye.com/blog/1702429Apache Commons VFS: File system Tools, do not come from the file system with different files to operate, can handle non-local files (VFS, the original FTP sometimes does not normally shut down the situation,
Refer to Region
Exception in thread "Main" Java. lang. noclassdeffounderror: ORG/Apache/commons/collections/MAP/listorderedmap
Later I checked and found that there was a packet error. The following six packages are commonly used in JSON.
Commons-logging-1.0.4.jar
And if the commons-collections-3.2.jar
ObjectiveBefore you have learned the Apache Commons beanutils package propertyutils and dynamic beans, the next will learn the remaining several tools, the personal feel is very practical, especially collectionutils;BeanutilsA brief introduction to the use of the next two methods, populate and Copyproperties,Populate can help us copy the value of the key value in the map to the bean's attribute value;Copypr
This uses Apache Commons compress to extract the. tar.z format files.For a file Test.tar.z, we can understand the decompression process as:
Unzip the test.tar.z into Test.tar;
Unzip the Test.tar to test.
According to an example of Apache Commons compress:Extract. Z File Example:inputstream fin = Files
Basic object Pool not found: "Java.lang.noclassdeffounderror:org/apache/commons/pool/impl/genericobjectpool" workaround
question: Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' DataSource ' defined in ServletContext resource [/web-inf/classes/applicationcontext.xml]: instantiation of Bean failed; Nested exception is java.lang.NoClassDefFoundError:Org/
Apache Commons is a very useful toolkit to solve a variety of practical common problems, here is a summary table, detailed information access to http://jakarta.apache.org/commons/index.htmlBeanutilsCommons-beanutils provides packaging for the Java reflection and introspection APIBetwixtBETWIXT provides services that map JavaBean to XML documents, as well as to th
Apache Commons is a very useful toolkit to solve a variety of practical common problems, here is a summary table,More Information Access http://jakarta.apache.org/commons/index.htmlBeanutilsCommons-beanutils provides packaging for the Java reflection and introspection APIBetwixtBETWIXT provides services that map JavaBean to XML documents, as well as to the opposi
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.