Java programming every day with a lot of jar files, project development in the continuous guidance package, in the busy day of work, put down those complex business implementation, not only want to ask these jar package how to build, the jar package has what unique place and so on.Originally these commonly seen jar pac
Reprinted from: http://www.cnblogs.com/lanxuezaipiao/p/3291641.htmlScenario One: The export feature that comes with eclipseStep 1: Prepare the master manifest file "MANIFEST." MF ",Because it is a Java project that refers to a third-party jar package, a custom configuration file, MANIFEST.MF, is required to create the file MANIFEST.MF under the project, which reads as follows:Manifest-version:1.0class-path:lib/commons-codec.jar Lib/commons-httpclient-
1. When the project does not reference the external jar package (j2se)
Select project ----> right-click, export... ---> JAVA ---> select JAR file ---> next --> select the path and name of JAR file --> next --- Select Main class ---> finish.
2. j2se)
Solution 1When other external jar packages are referenced in the proj
Actual problem encountered: a server and Client communication program (dependent on a third-party jar pack) Console execution server or client total error java.lang.NoClassDefFoundError, and the class is not defined by itself, tangled up found is a packaging error, did not find a third-party jar package, the solution is as follows:
Scenario 0: With the eclipse with the export function, exported runnabl
Under Linux Execute Jar file method: Enter file directory under command line,execute Java-jar file.jar i.e.Can also create a launcher on the desktop, fill in the command bar related commands: Java-jar/file path/file.jar, so that the desktop double-click to open the Jar fileCreate an executable
objects, its usage is a bit like a stack (of course, the internal principle is the old EastWest, but provides encapsulation of a higher layer ).Commons-discovery-0.2.jar: The implementation of the discovery mode that provides a general method for locating and instantiating classes or other resources. Use the best algorithm to obtain all the interfacesNow. This is especially useful when users want to find all the providers that provide a certain servi
simplify the implementation of various communication programming between HTTP client and server sideCommons-io-1.1.jar: Extended for Java.io.InputStream and readerCommons-lang-2.4.jar: extension to java.lang.*Commons-logging-1.1.1.jar: Log PackCommons-pool-1.3.jar: Implemen
We oftenCodeRead some resource files (such as video, music, text, etc ). These simple operations are certainly not problematic when running them separately. However, if we compress the code into a jar package, even if we package the resource files together, these things cannot be found. Take a look at the following code: Java code
//Source code1:
PackageEdu. hxraid;
ImportJava. Io .*;
PublicClassResource {
PublicVoidGetresource ()ThrowsI
In maven, by default, the dependent JAR package is not scored into the executable jar package, and if you need to break the dependency into the executable jar package, you need topomadded inmaven-assembly-pluginplug-ins, this is easy to implement, but it is not recommended in the formal development of such use, why? Because a slightly larger project has at least
Sometimes you need to export the j2se project so that it can operate elsewhere, so you don't have to stick to the feeling of development before it can run.The procedure is as follows:Method 1: (export directly when the project does not reference an external jar package)
Select project ----> right-click, Export... ---> Java ---> JAR file ---> next --> select the path and name of
:
C3PO is a database connection pool, and hibernate can be configured to use C3PO connection pool. If you want to use this connection pool, you need this jar package.
Proxool. jar:
It is also a connection pool, same as above.
Comm
ehcache-core-2.6.8. Jar BCM ail-jdk14-138.jar Jackson-annotations-2.8.0.jar mybatis-ehcache-1.0.3. Jar Spring-core-4.1.4.release.jar commons-fileupload-1.2.2. Jar POI.J ar jstl-1.2.jar Itext-2.1.7.
Two ways that eclipse will package a Java project that references a third-party jar package into a jar fileScenario One: The export feature that comes with eclipseStep 1: Prepare the master manifest file "MANIFEST." MF ",Because it is a Java project that refers to a third-party jar package, a custom configuration file, MANIFEST.MF, is required to create the file
Detailed jar commandjar {ctxu}[vfm0m] [jar-file] [manifest-file] [-C directory] File name ...where {CTXU} is a subcommand of the jar command, each time the jar command can contain only one of the CTXU, each of which represents:
-C Create a new JAR file package
-
of these data sources as much as possible to improve the database access performance of the program.
L DBCP is an open source connection pool implementation under the Apache Software Fund organization , and the application should add the following two jar files to the system using the DBCP data source:
Commons-dbcp.jar: Implementation of connection pooling
Commons-pool.jar: Dependency libraries for connect
Jar package merge and jar merge
Merge multiple jar packages:
1. First, extract the jar package to be merged to the same directory. Jar xvf xxx. jar
2. Use the jar command to package
Reprint: Http://hxraid.iteye.com/blog/483115?page=3#commentsWe often read some resource files in the code (compared to slices, music, text, etc.). These simple processes are of course not problematic when running alone. However, if we make the code into a jar package, even if the resource files are packaged together, these things will not be found. Take a look at the following code://Source code 1: PackageEdu.hxraid;ImportJava.io.*; Public classResour
.
C3p0. jar: C3PO is a database connection pool, and hibernate can be configured to use C3PO connection pool. If you want to use this connection pool, you need this jar package.
Proxool. jar: It is also a connection
Scenario One: The export feature that comes with eclipseStep 1: Prepare the master manifest file "MANIFEST." MF ",Because it is a Java project that refers to a third-party jar package, a custom configuration file, MANIFEST.MF, is required to create the file MANIFEST.MF under the project, which reads as follows:Manifest-version:1.0class-path:lib/commons-codec.jar Lib/commons-httpclient-3.1.jar Lib/commons-lo
During the project process, use eclipse to compress a jar package and use export --> JAVA --> JAR file. In my jar package, a third-party jar package, such as log4j, I also encountered this problem:
Http://zhidao.baidu.com/question/48376665.html
"Other jar packages are refe
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.