Command1.java file converted to class file: Javac-source 1.6-target 1.6 X.java (X.java is the file to be converted, the default is to generate a class file of the same name)Such as:
D:\java\studio\sdk\build-tools\22.0.1>javac-source 1.6-target 1.6 com/chaos/ha
Ck/AntiLazyLoad.java
2.class file converted to jar file: Jar CVF X.jar Y.class (Y.class is the file to be converted, X.jar is the converted file)Su
I. Preparation and execution of orders
Learning Plug-ins:
Learn the Apache packaging plugin maven-assembly-plugin:http://maven.apache.org/plugins/maven-assembly-plugin/usage.html
To execute a command:
will be typed into the jar package, execute Java-jar xxx.jar, you can.
Two, main method to make Jar package, and reference third party maven
Since the package is duplicated, remove the Servlet-api-2.5.jar from the Post project and do not clean the project and restart the server directly. Because the package in the project is preferred and the actual use requires a package in Tomcat, the direct-in page is reported org.apache.jasper.JasperException:Unable to compile class for JSPDelete D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jeewx\WEB-INF\lib\ Servlet-api-
Today, when integrating the jar package, there is aThis is the jar coordinates I imported.Dependency> groupId>Com.alibabagroupId> Artifactid>DruidArtifactid> version>1.0.14version>Dependency>And then looked at its dependencies, and sure enough, they found the two dependencies.Dependency> groupId>Com.alibabagroupId> Artifactid>DruidArtifactid> version>1.0.14version>
MAVEN coordinates introduced:Aliyun-java-SDK-coreAliyun-java-SDK-dysmsapiDOS introduction jar to local Warehouse command:MVN Install:install-file-dgroupid=com.aliyun-dartifactid=aliyun-java-sdk-dysmsapi-dversion=1.0.0-snapshot- Dpackaging=jar-dfile=aliyun-java-sdk-dysmsapi-1.0.0-snapshot.jarMaven jar coordinates and Doc introduced to a
First, package the project into a jarThe first step:Select item, right mouse button, select Export, appear as followsThe next step is to click Next,next, and then click Finish to generate the jarSecond, restore the jar into the projectThe first step is to decompile the jar with the Anti-compilation toolThe second step is to save the post-compilation project as a ZIP packageThe third step is to extract the z
Why does the project's jar package conflict with the Tomcat jar package?Encounter this problem, guess Tomcat start will be their Lib and the project Lib logically merged into a large lib, but did not make version and go to heavy, so that the same package may have two references, start naturally do not know which package, which will lead to conflict. Purely guessing, and then adding corrections after studyin
Most of the time when we work in the company, we don't see the source code when eclipse refers to a jar package that is packaged by others, so it's not very good to understand the intentions of others, so we need help with anti-compilation. OK, here's how to use the anti-compilation method correctly.One, download Net.sf.jadclipse_3.3.0.jar and put it in the plugins folder under the Eclipse folderSecond, del
1, Java Operation
Test jar: Execute---java-classpath f:/testhello.jar Test2
Or
JAVA-CP F:/testhello.jar Test2
Print Results: Hello World
The Java classes are as follows:
/**
* Document: This kind of function----> Print Hello World
* USER:YANGJF
* date:2016/9/25 9:48
/Public Class Test2 {public
static void Main (string[] args) {
System.out.println (' Hello World ');
}
2, Scala operation
Test
After Oracle 9.2, the naming of the JDBC driver will change, and the jdk1.1,jdk1.2 driver name (Class12.jar) will no longer change, it continues, starting with JDK1.4 all changes to the driver name, For example: JDK1.4 's driver name is Ojdbc14.jar. The driver name for the JDK1.5 is Ojdbc15.jar.
JDBC versions should be selected in different versions of the dat
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
-
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
The program needs to be packaged intoJardocuments for use by third parties for project requirements(the pictureThe text resource is written toJarin the package,when a third-party call,you only need toAndroidmanifest.xmlconfiguration under the correspondingActivitythroughstartactivityWay Pull UpActivity): On the internet for a long time, and rely on viewAndroidSource finally solves the problem A: need to understand knowledge: 1.APK Span style= "font-size:9pt" in Res directory does not pass
The project needs to be packaged intoJardocuments for use by third parties for project requirements(the pictureThe text resource is written toJarin the package,when a third-party call,only need toAndroidmanifest.xmlconfiguration under the correspondingActivitythroughstartactivityWay Pull UpActivity): On the internet for a long time. and rely on viewAndroidsource code finally overcame the problem A: Need clear knowledge: 1.APK Span style= "font-size:9pt" in Res folder does not pass Eclip
Java javacsv. jar application for csv file operations, csvjavacsv. jar
Csv files are separated files. If you use java I/O streams for writing, it is troublesome. Here we provide you with a jar package of javacsv, which is very convenient for you to operate csv files.
: Https://pan.baidu.com/s/1i46ErFB
So how to use it?
Take a look at the next example and you will
After importing the maven project using eclipse with the m2eclipse plug-in installed, Pom. XML start position: missing artifact COM. the Sun: Tools: jar: 1.5.0 error is not a big problem, but this error will block the eclipse build Maven project. There are two solutions to this problem:
Method 1:
Find the eclipse. ini file in the eclipse installation directory and append the VM parameter to the-vmargs parameter. The following is an example:
Java uses Redis connection poolingJar Package for Jedis-2.9.0.jar+commons-pool2-2.4.2.jar1 Packagecom.test;2 3 ImportRedis.clients.jedis.Jedis;4 ImportRedis.clients.jedis.JedisPool;5 ImportRedis.clients.jedis.JedisPoolConfig;6 7 Public classRedisutil {8 //Redis Server IP9 Private StaticString ADDR = "192.168.0.41";Ten One //the port number of the Redis A Private Static intPORT = 6379; - - //Access Password the Priv
Import Zxing.jar package on Android, always error:
Could not find class ' Com.google.zxing.MultiFormatWriter ' and referenced from method Com.changyang.app.util.Encode2dUtil.creat2DCode
the solution was later found :
Prior to the release of Adt17, a Lib directory was created and add to Buiild path when importing the Third-party jar packages .
After the adt17 version, import the third party jar package,
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.