The command line builds and runs the Jar Bao (the command line packs multiple. class files, modifies the manifest file) __adb

Source: Internet
Author: User
In the Android plug-in process, you need to export the interface project to the jar package, and then export the jar package to the plug-in project. The Jd-gui to view the jar package found only the. Class and signature files generated by the Java class in the jar package. Eclipse enables this step by choosing to export only the contents of the Java file directory when the jar package is exported, but the way in which you try to generate a jar package from the command line is an error. Because the context contexts are referenced in the Java class, and this is not Java engineering, it is an Android project. So you need a series of command-line tools for the Android SDK to do this. This is the first time you want to complete the previous written command line to generate the jar package notes: 1. First write four Java classes: put in the same folderSuch as:
2. Command line input: Javac *.java
Generates a. class file or command line input for all source (. java) files in this directory under the current directory. javac-d path *.java the. class file generated by all the source files in this directory. Put in the specified directory 3. Command line input: Jar CVF Test2.jar *Pack all the files (including the subfolders) in the current directory into the jar package.
4. Specify the main class name in the jar package from the command line (modify the configuration manifest file)First, create a file Mainconfig.txt to write the configuration jar package information
Mainconfig.txt format requires "Main-class: Space package name." Main class name Enter NewLine "
Then execute the command line: JAR-CVFM my.jar mainconfig.txt *//format is JAR-CVFM option to generate Jar name configuration jar Package Name (* indicates all files under current directory) Execute the result and command the line to run the jar package as follows:
Reference: http://www.cnblogs.com/liyanbin/p/6088458.html
http://blog.csdn.net/ly969434341/article/details/46698157
                           http://blog.csdn.net/doupei2006/article/details/8129600

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.