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
Java. after the class, if you just use Java commands to execute it, you may not think it is too enjoyable. It is interesting to find a way to generate a file that can be executed by double-clicking with the mouse like an EXE file. Here I use a free small software called exe4j. It feels good.
Next, you need to select the. Class file you are about to release. The following is a jar file. Here I use the name D: myjavatest. for example, write a file manif
Background:Upload jar package from FTP to Linux, then download jar package file on Linux via FTP command, start execution Java-jar, always prompt error: error:invalid or corrupt jarfile Xxx.jarHowever, local execution is carried out under CMD.We were going to run a HDFs file operation via the yarn jar or Hadoop
@@ 首先 Most important cmd command: Javac, jar: Use the following ( note [.] Do not lose the wrong ):1. Javac Compilation:D:\myworkset\idea_hadoop>javac-d. \out\production-cp. \lib\*-encoding Utf-8 Src\com\it18zhang\hadoop\*.java2.jar Packaging:D:\myworkset\idea_hadoop>jar cvfm. \out\artifacts\idea_hadoop.jar. \out\production\meta-inf\manifest. Mf-c. \out\productio
One way to do this is to set the classpath in the Mainfest file in the jar file you want to execute. It's easy to write the wrong name. Add the. jar file in the delete Lib folder at any time because you need to modify the Mainfest file every time you add a deletion classpath
There's a lot of it. How to set the jar package for a directory to classpath, but if you
, the attachment has aFor the package that resolves this issue, see the following: Proxool-0.9.0rc3.jar in the attachment compression package. Also need to jdk1.5 above the environment.Summary moment:In summary, these several open source connection pool each has the merits and demerits, the recommendation uses the C3P0, has tested this kind of connection pool per
Tags: center how much gets through reads memory scheme sleep state CTI Thread_pool and Connection_pool When the client requests a large amount of data, using the thread pool can save a lot of system resources, so that more CPU time and memory can be effectively utilized. And the use of database connection pool will greatly improve the efficiency of the program, at the same time, we can through its own manag
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
1, we need to increase the configuration file jar needs, select the project's src directory, right mouse button, select [New]-select [Folder].2. Enter Meta-inf as the directory name and click [Finish].3, select the directory you just created, right mouse button, select [New], select [File].4, input MANIFEST. MF, select [Finish].5, edit the file, modify the following content:manifest-version:1.0Main-class:lession1. HelloWorldClass-path:spring.jar Sprin
When you export a normal jar package using eclipse before the project is released, if the configuration is not good, the Java-jar /test.jar following three types of error messages may appear when you run the command:1. The no main manifest attribute, in /test1jar Main method is not specified;2. The Error: Could not find or load main class Main method is not specified;3. Exception in thread "main" java.lang.
Jar package using Eclipse packaging stepsRight-click on the item to be packaged-"SELECT Export"There are two ways to pack up here.1. If no other third-party package is used in the project, then the first one in the direct selection (JAR file)2. If there are references to other third-party packages in the project, use the second (Runnable jar file) in the selectio
The reason to export the runnable jar is because we want to export the referenced jar package with this project, so do not select the Jar fileChoose File/export ... Then java/runnable the jar file and select the class with main () to execute, select extract required libraries into generated
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.