tool is basicallyTarThe syntax of the command is the same.Command Options : - C Create a new archive or an empty archive on the standard output. - t lists the table of contents on standard output.-x[file] extracts all files from standard input, or extracts only the specified files. If file is omitted, all files are extracted, otherwise only the specified file is fetched. -f The second parameter specifies the
Java packaging is an issue. It is inevitable to create a war package or jar package. In general, there are two methods to directly use the JDK command and ant. Let's sort out these two methods today.
1.1 million war packages
1.1 Use commands
> Jar CVF project_name.war // expand
It's really hard to get a name that sums up all the content of this blog.Java is a magical language that can be said to be used everywhere as a learningJava can be used to develop mobile PC desktop Terminal Server Web front end programThe other 3 areas of Java are well developed, but the PC desktop side almost no one to use, why?The reason is simple, the Java leader brain is eaten by zombiesFor a simple che
("successfully created an Object of A");} catch (Exception e) {e. printStackTrace (); System. out. println ("An error occurred while accessing jar to create an Object on the Web! "+ E. toString ());}}}
Iii. Problems
1. Why can I directly execute Java Application and access jar and
Eclipse uses the export jar package to open the image when it is not loaded.
The cause of this problem is mostly because of the path problem, often in the project to run normally, but once packaged into a jar can not be normal display, the following summarizes the solution to this problem:
One, through the use of external resource files to solve
After you have packaged the project to build the
)Packing is a bit more complicated at this time:The previous 4 steps are the same as above, but the 5th step is to select the use existing mainfest from workspace option, and select a MANIFEST.MF file you created yourself because the default selection is generate the Manifest the file option, which does not use a third-party jar package for the project to penetrate into the jar package generated by the
JD-GUI
This JD-GUI can decompile the jar package, the usage is to open the jar package directly browse.
JD-Eclipse
JD-Eclipse is an Eclipse plug-in. The installation method is to open eclipse, and the menu is help-> install new software... InputHttp://java.decompiler.free.fr/jd-eclipse/update, And then install it all the way. After downloading the plug-in Realignment for JD-Eclipse, copy it to the p
Use Fat-jar to package multiple Java projects as executablesSolve the problem of packaging multiple interdependent Java projects as executables!Prerequisites: Install the Eclipse Fat-jar plugin. After you download the Fat-jar package, unzip it and copy the plugins below into
java.lang.reflect.InvocationTargetException;/** * Runs a jar application from any url. Usage is 'java JarRunner url [args..]' * where url is the url of the jar file and args is optional arguments to * be passed to the application's main method. */public class JarRunner { public static void main(String[] args) { if (args.length
Compile a simple HelloWorld pr
option, and select a MANIFEST.MF file you created yourself because the default selection is generate the Manifest the file option, which does not use a third-party jar package for the project to penetrate into the jar package generated by the Java project.Custom configuration file MANIFEST.MF:First create a manifest.m
IDE environment, you can run Java application directly with the Exec-maven-plugin plug-in, similar to the following:1 plugin>2 groupId>Org.codehaus.mojogroupId>3 Artifactid>Exec-maven-pluginArtifactid>4 version>1.2.1version>5 executions>6 Execution>7 Goals>8 goal>Execgoal>9 Goals>Ten Execution> One executions> A Configuration> -
goal>Repackagegoal> A Goals> - Execution> - executions> the plugin>springboot Packaging Plug-inSecond, packagingMVN PackageIii. entering target 1. Unzip the jar fileGet three of directories:(1) Org Application entry class, responsible for loading the check jar package(2) Boot-inf contains two directoriesLib
Java-written items, with only the compiled class and some deployment files. The war package contains everything, including written code compiled into the class file, dependent packages, configuration files, all Web pages, including html,jsp and so on.A war package can be understood as a Web project, which is everything in the project. When do I use a jar package or war package? When your project is not ful
The role of Java packaging jar,war,ear packages, differences, packaging methods. A) effect and difference I.Jar: Typically a generic (JAVA) class is referenced at development time, and a package facilitates storage Management II.War: is done after a (web) application, usually a Web site, into a package deployed into a container III. Ear: Enterprise applications,
First, the framework of the download 1, struts2:http://struts.apache.org/download 2, Spring:http://www.springsource.org/download/community3, hibernate:http://sourceforge.net/projects/hibernate/files/hibernate4/. Create a project, add a JAR package 1, create a Java Web Project testssh.2, Add a struts package: Aopallianc
Original Portal: http://www.2cto.com/kf/201204/129495.htmlTools and environments to use:MyEclipse 7.5 Java Enterprise, JDK1.6.0To package a jar file:The first step is to create a Java project and click on the menu bar----New---Java project--WEB project Details---> project na
Jar Package: A class that someone else has already written, and then package the classes, you can bring them into your project, and then you can use the classes and properties and methods in those jar packages directly. Jar packages can be divided into executable jar package
.)--------------------------------------------
ThenUse the jar command to generate executable jar files, for example:(Go to the Directory D:/chat/before executing this command /)Jar cvfm Cal. Jar manifest. MF *. Class
Jar usage:
contain warning warning or error errors. Generally, don't worry about him, Next.5. The next page can be configured for the project. (If the project does not introduce a third-party jar package, this is the system default option for Ok,main class must be set to be the Main method entry class for your project)* Generate The manifest file is the system to help us automatically generate MANIFEST.MF files, if your project does not reference other Class-pa
Objective:Recently the company has made a tool to package this tool into a running program, and writing Start.bat and start.sh can run under both Windows and Linux.On the internet to find a lot of information, finally found a reliable information, recorded, share to everyone, also considered a summary of their own.The draught does not forget to dig the well man, thanks this elder brother article: 78560715Not many BB go straight to work!I. Structure of the projectBecause it's just a test, it's no
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.